当前位置:网站首页>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.
边栏推荐
- oracle数据库版本问题咨询(就是对比从数据库查询出来的版本,和docker里面的oracle版本)?
- # # yyds dry goods inventory interview will brush TOP101: to determine whether there is a part of the list
- "Wei cup" school more than 2022 cattle summer camp 4 Nancy (polocy) pelosi article variance law of Arts
- Week 19 Progress (Understanding IoT Basics)
- Compressing Deep Graph Neural Networks via Adversarial Knowledge Distillation
- Abstract classes and interfaces (study notes)
- JS中? ?和??=和?.和 ||的区别
- 【LeetCode】64. 最小路径和 - Go 语言题解
- $\text{ARC 145}$
- PS Basic Learning (1)
猜你喜欢
随机推荐
[MySQL] Mysql transaction and authority management
Apache Doris series: detailed steps for installation and deployment
2D Transform Module && Media Queries
动态修改el-tab-pane 的label(整理)
The performance management method OKR is used by all companies
[SAM template question] P3975 [TJOI2015] string theory
软考总结
递增三元组
Manually set transaction commit in mysql
数据清洗-使用es的ingest
"Wei cup" school more than 2022 cattle summer camp 4 Nancy (polocy) pelosi article variance law of Arts
2022牛客暑期多校训练营1 J Serval and Essay
Debezium报错系列之二十:task failed to create new topic.Ensure that the task is authorized to create topics
DFS题单以及模板汇总
【LeetCode】70. 爬楼梯 - Go 语言题解
Debezium error series 20: task failed to create new topic. Ensure that the task is authorized to create topics
mysql 中手动设置事务提交
uni-ui installation
MPI简谈
ZZULIOJ:1119: sequence order









