当前位置:网站首页>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.
边栏推荐
- Better CV link collection (dynamic update)
- day6-jvm
- 用指针访问二维数组
- vscode 多行注释总是会自动展开的问题
- Xshell远程访问工具
- Qt 使用纯代码画图异常
- MySQL download and installation environment settings
- "Statistical learning methods (2nd Edition)" Li Hang Chapter 13 introduction to unsupervised learning mind map notes
- 精确计算时间延迟VxWorks 时间戳 详解
- Machine learning (Zhou Zhihua) Chapter 3 Notes on learning linear models
猜你喜欢

Statistical learning methods (2nd Edition) Li Hang Chapter 22 summary of unsupervised learning methods mind mapping notes

Learning rate optimization strategy

jestson安装ibus输入法

MySql与Qt连接、将数据输出到QT的窗口tableWidget详细过程。

AD1256

STM32标准外设库(标准库)官网下载方法,附带2021最新标准固件库下载链接
![[USB host] stm32h7 cubemx porting USB host with FreeRTOS to read USB disk, usbh_ Process_ The OS is stuck. There is a value of 0xa5a5a5](/img/be/b7723920f0e81e8699bb26dd1c0fe5.png)
[USB host] stm32h7 cubemx porting USB host with FreeRTOS to read USB disk, usbh_ Process_ The OS is stuck. There is a value of 0xa5a5a5
![[MYCAT] Introduction to MYCAT](/img/26/8911fe9e1fb104d7185dda0881804b.png)
[MYCAT] Introduction to MYCAT

JVM system learning

AD1256
随机推荐
传统的k-means实现
绘制轮廓 cv2.findContours函数及参数解释
C language linked list (create, traverse, release, find, delete, insert a node, sort, reverse order)
找数组中出现次数最多的数
OSError: [WinError 127] 找不到指定的程序。Error loading “caffe2_detectron_ops.dll“ or one of its dependencies
AD1256
day3-jvm+排序总结
Machine learning (zhouzhihua) Chapter 2 model selection and evaluation notes learning experience
列表写入txt直接去除中间的逗号
【USB Host】STM32H7 CubeMX移植带FreeRTOS的USB Host读取U盘,USBH_Process_OS卡死问题,有个值为0xA5A5A5A5
Openwrt quick configuration Samba
在网络中添加spp模块中的注意点
[MYCAT] MYCAT configuration file
Add se channel attention module to the network
JUC并发编程基础(1)--相关基础概念
String methods and instances
通道注意力与空间注意力模块
STM32 DSP library MDK vc5\vc6 compilation error: 256, (const float64_t *) twiddlecoeff64_ 256, armBitRevIndexTableF64_ 256,
JVM系统学习
Official account development custom menu and server configuration are enabled at the same time