当前位置:网站首页>Installation considerations for pytorch
Installation considerations for pytorch
2022-07-30 23:34:00 【Fenghua Mingyuan】
The official download address of pytorch is:
https://download.pytorch.org/whl/torch_stable.html
Torch and torchvision need to be installed.The version is divided into support cpu and gpu, and there are many, you need to pay attention to find.
The installation command is
pip install torch-1.10.0+cu113-cp39-cp39-win_amd64.whlpip install torchvision-0.12.0+cpu-cp39-cp39-win_amd64.whlIt should be noted that the versions of torch and torchvision are different.This is the first pit.Due to the large torch package, it is recommended to install torchvision first, confirm the version and then download torch.
The second pit is that there will be errors when using tensorboard.The method given on the web is to use an older version of setuptool.This method is not advisable.It is better to modify the init.py file of tensorboard:
import tensorboard#from setuptools import distutilsfrom distutils import version as vvv#LooseVersion = distutils.version.LooseVersionLooseVersion = vvv.LooseVersionif not hasattr(tensorboard, '__version__') or LooseVersion(tensorboard.__version__) < LooseVersion('1.15'):raise ImportError('TensorBoard logging requires TensorBoard version 1.15 or above')#del distutilsdel vvvdel LooseVersiondel tensorboardfrom .writer import FileWriter, SummaryWriter # noqa: F401from tensorboard.summary.writer.record_writer import RecordWriter # noqa: F401Use the distutils package directly.
The third pit is the ssl link.Because the certificate thing will cause the ssl link to fail.The method is to modify the ssl.py file:
#_create_default_https_context = create_default_context_create_default_https_context = _create_unverified_contextAt line 805.Instead of create_default_context use _create_unverified_context.
The fourth pit is about cuda.It is estimated that every beginner will encounter it.I encountered it when I installed tensorflow.This time it went smoothly without any trouble.
I didn't expect tensorflow to decline so fast.I've also written a lot and am now learning pytorch from scratch.Programmers are hard work, because there are endless new things to learn.
边栏推荐
- 状态机动态规划之股票问题总结
- pytorch的安装注意事项
- A detailed explanation: SRv6 Policy model, calculation and drainage
- # # yyds dry goods inventory interview will brush TOP101: to determine whether there is a part of the list
- 2022 Nioke Summer Multi-School Training Camp 1 J Serval and Essay
- 从编译的角度来学作用域!
- 测试人面试 常被问到的计算机网络题,高薪回答模板来了
- grub learning
- EasyExcel综合课程实战
- Apache Doris系列之:安装与部署详细步骤
猜你喜欢

The difference between ?? and ??= and ?. and || in JS

EasyExcel comprehensive course combat
![[MySQL] Related operations on databases and tables in MySQL](/img/a5/c92e0404c6a970a62595bc7a3b68cd.gif)
[MySQL] Related operations on databases and tables in MySQL

阿里云视频点播+项目实战

uniapp开发微信小程序-软考刷题小程序

H5跳转微信公众号解决方案

2022 China Logistics Industry Conference and Entrepreneur Summit Forum will be held in Hangzhou!

EasyExcel综合课程实战

软件测试三阶段,你在哪一步?

Lambda表达式
随机推荐
leetcode 406. Queue Reconstruction by Height
“蔚来杯“2022牛客暑期多校训练营4 L.Black Hole 垃圾计算几何
状态机动态规划之股票问题总结
天空云变化案例
46.<list链表的举列>
360核心安全大脑3.0正式发布,构建政企用户的“能力中枢平台”
Detailed operator
怎么开通代付通道接口?
Introducing the visualization tool Netron
实验7(MPLS实验)
Reverse linked list - head insertion inversion method
HCIP Day 15 Notes
EasyExcel综合课程实战
leetcode(刷题篇13)
Dry goods | 4 tips for MySQL performance optimization
ZZULIOJ: 1120: the most value to exchange
2022中国物流产业大会暨企业家高峰论坛在杭州举办!
二叉查找树的定义,查找,插入,删除
Shell脚本 if语句
BFS题单总结