当前位置:网站首页>pytorch官网中如何选择以及后面的安装和pycharm测试步骤
pytorch官网中如何选择以及后面的安装和pycharm测试步骤
2022-07-30 05:06:00 【看星河的兔子】
安装步骤
前面的安装步骤很容易搜到,这里就不赘述。
windows系统可以在任务管理器(设备中搜索)中看自己是否有GPU或者自己的GPU类型
如果你的显卡是NVIDIA,根据它的推荐选择CUDA版本,一般游戏本的配置会好一些,像我的是轻薄本配置就会不太适合。
像我的是AMD类型不支持CUDA,所以选择CPU,再运行下面的这串代码conda install pytorch torchvision torchaudio cpuonly -c pytorch
开始下载
下载完成显示done
以下代码可以测试,但注意我们下载的是cpu版本的,不是CUDA版本,所以后面两行代码是不能达到理想运行成果的。
import torch
print(torch.__version__) # pytorch版本
print(torch.version.cuda) # cuda版本
print(torch.cuda.is_available()) # 查看cuda是否可用

在pycharm中搭载环境
选择file-----settings----python interpreter-----小齿轮-----add-----然后如下图所示
运行情况
from torchvision import models
print(dir(models))

可以运行
边栏推荐
- Unity stepping on the pit record - the use of GetComponent
- Solve the go environment can not compile exe
- 1. Get data - requests.get()
- Three Solutions for SaaS Multi-tenant Data Isolation
- Boss Rush (two-point answer + DP)
- Unity3D Application simulation enters the front and background and pauses
- LeetCode Algorithm 328. 奇偶链表
- Nuxt3 learning
- DLL说明(1)
- C. Qualification Rounds
猜你喜欢

Summary of skills in using ms project2010 project management software
![[MRCTF2020]Hello_misc](/img/ea/0faacf6e544b60e3459d8ace4d5f42.png)
[MRCTF2020]Hello_misc

2.5 Quick Sort
![handler+message [message mechanism]](/img/4b/981d5eb2f1afc98a4ceab38c505325.png)
handler+message [message mechanism]

Us to raise interest rates by 75 basis points in "technical recession"?Encryption market is recovering

【Vitis】ZCU102开发板PS端控制PL端复位的代码实现
![[Linear table] - Detailed explanation of three practice questions of LeetCode](/img/71/91ba0cc16fe062c1ac9e77e1cc8aa2.png)
[Linear table] - Detailed explanation of three practice questions of LeetCode

GO语言学习笔记一

VisualStudio2022本地调试进入特别慢问题解决

webService interface
随机推荐
Hexagon_V65_Programmers_Reference_Manual(12)
[MRCTF2020]Hello_misc
美国再次加息75个基点 陷入“技术性衰退”?加密市场却呈现复苏力量
Hexagon_V65_Programmers_Reference_Manual (12)
Requirements design document and the changing role of the product manager
字符串问题(上)
Code readability, pre-checks, comments and summaries
【Verilog】HDLBits题解——Circuits/Combinational Logic
Usage of EFR32 as sniffer for Zigbee/Thread
解决go环境编译不了exe
Predictive maintenance scheduling of multiple power equipment based on data-driven fault prediction
How with Mexico Volkswagen VW EDI connection to Mexico
模拟问题(中)
七、自定义配置
Detailed explanation of REUSE_ALV_GRID_DISPLAY
SaaS多租户数据隔离的三种解决方案
Xiamen SenseCore Technology MC3172(1): Introduction and Environment Construction
5. View parsing and template engine
Hexagon_V65_Programmers_Reference_Manual (10)
error: The following untracked working tree files would be overwritten by