当前位置:网站首页>Installation of tensorflow and pytorch frames and CUDA pit records
Installation of tensorflow and pytorch frames and CUDA pit records
2022-07-24 06:02:00 【Julyers】
pytorch
use conda Creating a virtual environment python=3.6 in the future , I found the use of conda install torchvision installed pytorch yes cpu Version of , I won't support it gpu, I made a mistake when running code .
import torch
torch.__version__
torch.cuda.is_available()
here cuda yes False,gpu Unavailable . Then you need to use conda uninstall torchvision uninstall torchvision.
Reuse pip install torchvision -i https://pypi.douban.com/simple install , verification gpu Is it available , Now it's True,gpu You can use .
Above test ,pip Installed torchvision The corresponding will be installed at the same time cuda toolkit package , and conda Installation only supports cpu.
tensorflow
After I tossed about for a long time, the graphics card driver 、cuda、cudnn in the future , Discover the use of conda install tensorflow, Will automatically install the corresponding cuda, verification gpu Is it available , Turned out to be True...
import tensorflow as tf
tf.test.is_gpu_available()
Personal test :
Don't pretend cuda and cudnn, Direct adoption conda After creating the virtual environment , Use conda install tensorflow-gpu==1.15.0 Will automatically install the corresponding cuda toolkit package , And then verify gpu Is it available , yes True.
About cuda and cudnn
1、 The graphics card driver can be in ubuntu Of Software & Updates Medium additional drivers In the process of replacement .
2、nvidia-smi It shows the driver cuda Version is 11.2. And manually installed cuda toolkit It's different .
see cuda edition
Manual installation will be in usr/local Under the folder .
cat /usr/local/cuda/version.txt
No installation cuda Input nvcc -V command , Installation cuda Of sudo apt-get install command , Use this command to install cuda be not in local Under the folder , And in the usr/lib Under the folder . Entering the above command will show that there is no such directory . Manual access lib Under the folder , Also have version.txt Visible version . This method is not recommended .
see cudnn edition
1) Use tar.gz Installed cudnn
cat /usr/local/cuda/include/cudnn.h | grep CUDNN_MAJOR -A 2
2) Use deb Installed cudnn
dpkg -l | grep cudnn

3、 About 3 The version of the .
drive cuda Version down compatibility cuda toolkit edition . The popular explanation is ,nvidia-smi Displayed drive cuda yes 11.2, The highest support cuda11.2. here tensorflow1.15.0 Corresponding cuda by 10.0,cudnn by 7.4.2.
边栏推荐
- MySQL download and installation environment settings
- Introduction to QT new project
- systemctl + journalctl
- day6-jvm
- How to solve the problem of large distribution gap between training set and test set
- JDBC初级学习 ------(师承尚硅谷)
- [activiti] Introduction to activiti
- Machine learning (zhouzhihua) Chapter 2 model selection and evaluation notes learning experience
- "Statistical learning methods (2nd Edition)" Li Hang Chapter 16 principal component analysis PCA mind map notes and after-school exercise answers (detailed steps) PCA matrix singular value Chapter 16
- Points for attention in adding spp module to the network
猜你喜欢

列表写入txt直接去除中间的逗号

Watermelon book / Pumpkin book -- Chapter 1 and 2 Summary

es6常用特性

day3-jvm+排序总结

"Statistical learning methods (2nd Edition)" Li Hang Chapter 15 singular value decomposition SVD mind map notes and after-school exercise answers (detailed steps) SVD matrix singular value Chapter 15

DeepSort 总结

Deepsort summary
![[deep learning] teach you to write](/img/c6/333b16758d79ebd77185be6e3cb38f.png)
[deep learning] teach you to write "handwritten digit recognition neural network" hand in hand, without using any framework, pure numpy
![[activiti] group task](/img/f1/b99cae9e840d3a91d0d823655748fe.png)
[activiti] group task

AD1256
随机推荐
[activiti] gateway
Openwrt quick configuration Samba
Machine learning (zhouzhihua) Chapter 2 model selection and evaluation notes learning experience
AD1256
systemctl + journalctl
在网络中添加spp模块中的注意点
day4-jvm
用指针访问二维数组
QT char to qstring hexadecimal and char to hexadecimal integer
精确计算时间延迟VxWorks 时间戳 详解
数组常用方法
Typora installation package in November 2021, the last free version of the installation package to download v13.6.1
原生js放大镜效果
day-7 jvm完结
Loss after cosine annealing decay of learning rate
The problem that the user name and password are automatically filled in when Google / Firefox manages the background new account
STM32 DSP库MDK VC5\VC6编译错误: 256, (const float64_t *)twiddleCoefF64_256, armBitRevIndexTableF64_256,
JDBC初级学习 ------(师承尚硅谷)
使用Qt连接MySql并创建表号、写入数据、删除数据
PDF文本合并