当前位置:网站首页>How to check whether the pytorch you are using is a GPU version
How to check whether the pytorch you are using is a GPU version
2022-07-26 20:41:00 【Yi Lanjun】
1 The easiest way
>>> import torch
>>> torch.cuda.is_available()
If the return is True, We use the GPU Version of torch, if False, Then for CPU edition
2 see GPU Method of model
>>> import torch
>>> print(torch.cuda.get_device_name(0))
Back to GPU The model is yours GPU model
3 Direct view GPU Method of model
Open the terminal and input the following commands in the terminal :
nvidia-smi
4 see cuda Version method
nvcc -V
边栏推荐
- 一文读懂 Kubernetes的四种服务类型!
- Do employees have to compensate the company for losses when they resign? The 34 year old captain resigned and was claimed 10.66 million yuan by the company
- Small scenes bring great improvement! Baidu PaddlePaddle easydl helps AI upgrade of manufacturing assembly line
- BUU刷题记3
- ES6新特性
- 全球最聪明50家公司公布:中国厂商占据近半,华为名列第一
- 【面试必刷101】动态规划1
- 查询字段较多时可以添加普通查询和高级查询两种情况
- Basic configuration and aggregation of BGP
- 20220726
猜你喜欢

Exchange 2010 SSL certificate installation document

Execution context and Lexical Environment

潘多尼亚精灵 VoxEdit 创作大赛

BGP routing black hole and anti ring

Where are the single dogs in the evening of 5.20?

BGP的路由黑洞和防环

Solve attributeerror: module 'win32com.gen_ py. 00020813-0000-0000-C000-000000000046x0x1x9‘ has no attribu

Fitting the new direction of curriculum standards, ape guidance, creating a characteristic new concept content system

Read the four service types of kubernetes!

Easycvr device management list page, paging data does not display problem repair
随机推荐
Build Prometheus automatic monitoring and alarm system from scratch
美司法部律师团队要求法官拒绝受理华为诉讼
884. 两句话中的不常见单词-哈希表
如何查看你使用的pytorch是否为GPU版本
How to praise others gracefully? Try these methods
营销与销售文件管理以及工作流程解决方案
Kotlin - 协程上下文 CoroutineContext
连接池快速入门
The first training course was a perfect success (๑ㅂ•) و*
「企业管理」精诚CRM+——一体化管理企业业务流程
Robin Lee was "poured cold water" enthusiasm! Baidu allied with Huawei Kirin to release "Honghu" chip
7.25模拟赛总结
Leetcode-300 最长递增子序列
剑指offer46把数字翻译成字符串
App uploader download and installation
How to assemble a registry?
Nmap installation and use
执行上下文与词法环境
Gbase learning - install gbase 8A MPP cluster v95
Ape tutoring's technological hard power: let AI start from reading children's homework