cuda安装教cudnn安装显卡问题
20220101
https://www.cnblogs.com/zucc-31701019/p/14665855.html
CUDA 安裝報錯 could not create file “…\chrome_elf.dll”
關閉360
20210617
https://blog.csdn.net/weixin_43486780/article/details/108664978
pytorch 1.6 cuda 10 顯卡安裝
20210607
https://blog.csdn.net/iLOVEJohnny/article/details/106021547
https://blog.csdn.net/wuzhongqiang/article/details/108881845
pytorch 利用 gpu運行模型
device = torch.device(“cuda:0” if torch.cuda.is_available() else “cpu”)
model.to(device)
https://www.jianshu.com/p/03b092454202
https://blog.csdn.net/weixin_41041772/article/details/109805687
顯卡命令
20210110
顯卡使用限制
指定多塊GPU的方式和前文完全一致,只需要多寫幾個編號即可:
import os
os.environ["CUDA_VISIBLE_DEVICES"] = "0, 2"
Part 3. 控制GPU顯存使用比例import tensorflow as tf
from keras.backend.tensorflow_backend import set_session
config = tf.ConfigProto()
config.gpu_options.per_process_gpu_memory_fraction = 0.3
set_session(tf.Session(config=config))Part 5. 顯存的按需分配(動態增長)
如果并不清楚自己的應用分配多少的顯存比例合適,可以使用按需分配的方式,也就是動態增長allow_growth:
import os
os.environ["CUDA_VISIBLE_DEVICES"] = "1"
import tensorflow as tf
from keras.backend.tensorflow_backend import set_session
config = tf.ConfigProto()
config.gpu_options.allow_growth = True
set_session(tf.Session(config=config))
加粗樣式
20210106
np.random.seed(123)
tf.set_random_seed(123)
config = tf.ConfigProto(inter_op_parallelism_threads=1)
config.gpu_options.per_process_gpu_memory_fraction = 1 # in my case this setting will use around 1G memory on GPU
set_session(tf.Session(config=config))顯卡使用量配置
20201228
windows 釋放顯存
taskkill -pid 123 -f
幫助里面的 /PID 斜杠 其實是橫杠
釋放顯卡顯存
fuser -v /dev/nvidia* #查找占用GPU資源的PID
然后我們執行:
kill -9 pid
然后再執行nvidia-smi就可以看到內存已經被釋放了
20201225
自己的電腦,cudnn 7.6 能適配 tensorflow 12.3 gpu
Process finished with exit code -1073740791 (0xC0000409)
顯卡運行時候報這種錯誤一般都是顯存溢出
顯卡路徑
nvidia 設置
顯卡運行進程查看
20201224
虛擬環境用的是系統環境的顯卡環境 無須單獨為虛擬環境配置顯卡
TF 和 cuda 版本對應問題
from tensorflow.python._pywrap_tensorflow_internal import *
ImportError: DLL load failed: 找不到指定的模塊。
解決方案在上面
20201223
https://blog.csdn.net/qq_27825451/article/details/89082978
https://tensorflow.google.cn/install/source_windows
tensorflow 與 顯卡對應關系
https://blog.csdn.net/kyle1314608/article/details/111573317
虛擬環境 tensorflow gpu
我的小米筆記本顯卡驅動
G:\顯卡驅動
20201125
https://docs.nvidia.com/cuda/cuda-toolkit-release-notes/index.html
https://blog.csdn.net/kyle1314608/article/details/110128025
顯卡對應版本查看
20200702
CUDA error: device-side assert triggered
Assertion t >= 0 && t n classes failed
報以上兩個問題的原因是 加載了上一次的模型,而上一次的模型有些數據
沒有在現在數據中存在 所以報類別沒出現的問題
20200619
RuntimeError: Attempting to deserialize object on a CUDA device but torch.cuda.is_available() is Fal
https://blog.csdn.net/quantum7/article/details/89333293
設置os.environ[‘CUDA_VISIBLE_DEVICES’]=‘1‘ 不生效
https://blog.csdn.net/zhouxiaowei1120/article/details/104131602
20200516
解決ubantu下:RuntimeError: cuDNN error: CUDNN_STATUS_EXECUTION_FAILED
https://blog.csdn.net/yepeng_xinxian/article/details/95519152
如果沒裝cudnn或者版本錯誤會報上面的問題
device = torch.device(‘cuda’ if torch.cuda.is_available() else ‘cpu’)
如果前面的cuda 寫成了cpu 會報下面的錯誤
RuntimeError: Input and parameter tensors are not at the same device, found input tensor at cpu and parameter tensor at cuda:0
裝10.0的版本
cuda9.0+cudnn7.0安裝教程
總結
以上是生活随笔為你收集整理的cuda安装教cudnn安装显卡问题的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 深度学习隐藏层
- 下一篇: mapreduce理解_大数据