
AI相关
无
Sayello
专心搬砖
展开
-
pytorch实现在cuda上多进程,能获取处理函数返回值
multiprocessing python多进程代码实现 pytorch 实现cuda多进程,并获取返回值代码实现原创 2022-08-09 15:31:50 · 1555 阅读 · 0 评论 -
nvidia-smi报错:NVIDIA-SMI has failed because it couldn‘t communicate with the NVIDIA driver
输入nvidia-smi显示 NVIDIA-SMI has failed because it couldn‘t communicate with the NVIDIA driver 但是torch.cuda.is_available()还能用,这就有些别扭了 出现这个问题一般是由于kernel mod 的 Nvidia driver 的版本没有更新 (不是人为因素) 解决办法: 1,重启机器(如果有足够权限的话,直接就能解决) 2,如果权限不够,不能重启的话,那就用命令reload kernel mod原创 2021-12-03 15:29:56 · 674 阅读 · 0 评论 -
显卡驱动报错:NVIDIA-SMI has failed because it couldn‘t communicate with the NVIDIA driver
系统:ubuntu 18.04 突然发现cuda不能用 torch.cuda.is_available() ==>False 终端输入 nvidia-smi显示如下 NVIDIA-SMI has failed because it couldn’t communicate with the NVIDIA driver 其他博客上说:“这是一个常见问题,经常出现在ubuntu系统中,主要原因还是系统内核升级了,导致新版本内核和原来显卡驱动不匹配” 并且给出了两种解决方案 解决方法一: 只需执行两条命原创 2021-11-22 10:14:41 · 1538 阅读 · 0 评论 -
Tf2,pytorch 获取Tensor的值
tensorflow pytorch 获取Tensor的值 tensor = tf.Variable(10, dtype=tf.int32) with tf.compat.v1.Session() as sess: sess.run(tf.compat.v1.global_variables_initializer()) value = sess.run(tensor) #value 就是你想要的值原创 2021-10-14 09:56:29 · 566 阅读 · 0 评论