当前位置:网站首页>Pytorch installs and uses GPU acceleration
Pytorch installs and uses GPU acceleration
2022-07-01 00:40:00 【Peng Xiang】
In the previous study , We came into contact with pytorch, At that time, bloggers considered their own graphics card performance and CUDA Version and other issues , So the installation is cpu Version of , Later, bloggers need to install gpu Version of , Therefore, you can only install it again .
Bloggers are using conda install , Because use pip It doesn't seem to support
Since the blogger has already installed and configured Anoconda, So bloggers only need to create a virtual space and install it 
Activate the virtual environment
conda activate your_env_name( Virtual environment name )

pytorch Installation of each version
https://pytorch.org/get-started/previous-versions/
Bloggers use cuda8, This corresponds to the following installation statement
conda install pytorch==1.0.0 torchvision==0.2.1 cuda80 -c pytorch


Installation successful 
We go back to our pycharm Take a look in the middle :
pytorch Judge gpu Is it available , Test it :
import torch
print('CUDA edition :',torch.version.cuda)
print('Pytorch edition :',torch.__version__)
print(' Whether the graphics card is available :',' You can use ' if(torch.cuda.is_available()) else ' Unavailable ')
print(' Number of graphics cards :',torch.cuda.device_count())
print(' Of the current graphics card CUDA Calculate the force :',torch.cuda.get_device_capability(0))
print(' Current graphics card model :',torch.cuda.get_device_name(0))

Although the graphics card is very stretched , But after all, it still works perfectly
边栏推荐
- 获取屏幕高度
- Redis - sentinel mode
- Solving the weird problem that the query conditions affect the value of query fields in MySQL query
- "Experience" my understanding of user growth "new users"
- left join左连接匹配数据为NULL时显示指定值
- Manage edge browser settings (ie mode, homepage binding, etc.) through group policy in the enterprise
- Redis based distributed lock
- Tide - rust web framework based on async STD
- Oracle-数据完整性
- SSM integration process (integration configuration, function module development, interface test)
猜你喜欢

剑指 Offer 18. 删除链表的节点

2022-2028 global capsule shell industry research and trend analysis report

ABAQUS 2022 software installation package and installation tutorial

Date类的实现

Ditto set global paste only text shortcuts

20220215 misc buctf easycap Wireshark tracks TCP flow hidden key (use of WinHex tool)

Inventory the six second level capabilities of Huawei cloud gaussdb (for redis)

C#生成putty格式的ppk文件(支持passphrase)

C # Generate PPK files in Putty format (passthrough support)
![[UML] UML class diagram](/img/6f/30bd15967103969e600d69e618d8bf.png)
[UML] UML class diagram
随机推荐
Length of the longest integrable subarray
Never use redis expired monitoring to implement scheduled tasks!
Host FL Studio fruit music production daw20.9
New trend of embedded software development: Devops
"Experience" my understanding of user growth "new users"
实验八 T-sql,存储过程
Wordpress blog uses volcano engine veimagex for static resource CDN acceleration (free)
女朋友说:你要搞懂了MySQL三大日志,我就让你嘿嘿嘿!
Stack frame
IBL预计算的疑问终于解开了
Solving the weird problem that the query conditions affect the value of query fields in MySQL query
Can JDBC based on openjdk connect to MySQL?
The full technology stack, full scene and full role cloud native series training was launched to help enterprises build a hard core cloud native technology team
Implementation of OSD on Hisilicon platform (1)
Rhai - rust's embedded scripting engine
Basic data structure of redis
PyTorch安装并使用gpu加速
2022-2028 global PTFE lined valve industry research and trend analysis report
2022-2028 global encrypted external hard disk industry research and trend analysis report
2022就要过去一半了,挣钱好难