当前位置:网站首页>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.
边栏推荐
- "NIO Cup" 2022 Nioke Summer Multi-School Training Camp 4 DHKLN
- “蔚来杯“2022牛客暑期多校训练营2 H.Take the Elevator
- HF2022-EzPHP reproduction
- How to open the payment channel interface?
- 软考学习计划
- [SAM template question] P3975 [TJOI2015] string theory
- Chevrolet Trailblazer, the first choice for safety and warmth for your family travel
- HCIP第十六天笔记
- 2021GDCPC Guangdong University Student Programming Competition H.History
- Abstract classes and interfaces (study notes)
猜你喜欢
随机推荐
grub learning
Apache Doris series: In-depth understanding of real-time analytical database Apache Doris
Summary of BFS questions
递增三元组
可视化工具Netron介绍
Data cleaning - ingest using es
Calico 网络通信原理揭秘
MPI简谈
mysql中关于存储过程无法实现迁移复制表中数据问题
proemthues 服务发现配置
[SAM模板题] P3975 [TJOI2015] 弦论
CPM:A large-scale generative chinese pre-trained lanuage model
边缘计算与小程序也能结合!智能家居是否能借势上台阶
pytorch的安装注意事项
EasyExcel comprehensive course combat
ZZULIOJ:1120: 最值交换
[0x800706D9] solution appears in Microsoft Store
2022 China Logistics Industry Conference and Entrepreneur Summit Forum will be held in Hangzhou!
uniapp折叠框二级循环
$\text{ARC 145}$
![[MySQL] Related operations on databases and tables in MySQL](/img/a5/c92e0404c6a970a62595bc7a3b68cd.gif)







