当前位置:网站首页>pytorch_ lightning. utilities. exceptions. MisconfigurationException: You requested GPUs: [1] But...
pytorch_ lightning. utilities. exceptions. MisconfigurationException: You requested GPUs: [1] But...
2022-06-28 01:47:00 【Begonia_ cat】
List of articles
Report errors
pytorch_lightning.utilities.exceptions.MisconfigurationException: You requested GPUs: [1] But your machine only has: [0]
The author's error reporting code :
trainer = Trainer(
max_epochs= config.max_epochs,
gpus= [fix_config.hparams.gpus],
distributed_backend= fix_config.hparams.distributed_backend,
benchmark= fix_config.hparams.benchmark,
deterministic= fix_config.hparams.deterministic,
logger=logger,
callbacks=[
early_stop_callback,
checkpoint_callback
]
)
if __name__ == "__main__":
# Create a parser
parser = ArgumentParser() # Writing a command line interface
parser.add_argument("--gpus", default=1, type=int) # Error source
...
This is the use of pytorch_lightning Error encountered in framework . Error reporting theory , What do you want? GPUs The number of [1], But your machine only has [0] individual .
To see this , I believe most people's first reaction is :
- hey ! Report the mistake that I did not gpu!
- Then go and check cuda
notes : If it shows cuda by Flase, Means youNot loaded cudaperhapstorch It 's loaded with cpu edition, It needs to be reinstalled . The author is in This note Configuration is introduced in cuda And corresponding gpu Version of pytorch、torchvision、torchaudio The bitterness of life , As a reference .- cuda It can be used ! So why does it say I only have
[0]Well ?
At first, the author couldn't understand , After looking up the meagre data , Find out The author's conjecture It may be right : in other words ,gpu The quantity is from 0 Start counting !
thus , Re translate the mistakes : Do you want 2 individual GPU, But your machine only has 1 individual GPU.
terms of settlement
Put the above code in ,gpu Change the quantity to 0.
...
parser.add_argument("--gpus", default=0, type=int)
边栏推荐
- 如何高效读书学习
- 力扣今日题-522. 最长特殊序列
- 嵌入式必学,硬件资源接口详解——基于ARM AM335X开发板 (上)
- 万字长文看懂商业智能(BI)|推荐收藏
- What are the requirements for customizing the slip ring for UAV
- Google Earth engine (GEE) -- an error caused by the imagecollection (error) traversing the image collection
- The contents of the latex table are left, middle and right
- Centos8 operation record command version Yum redis MySQL Nacos JDK
- Adobe Premiere Basics - common video effects (cropping, black and white, clip speed, mirroring, lens halo) (XV)
- 同花顺上能炒股开户吗?安全吗?
猜你喜欢

MapReduce elementary programming practice

数据库的新选择 Amazon Aurora

一张图弄懂 MIT,BSD,Apache几种开源协议之间的区别

Google Earth engine (GEE) -- an error caused by the imagecollection (error) traversing the image collection

什么是数字化?什么是数字化转型?为什么企业选择数字化转型?

联想拯救者R720如何组建双通道内存

The practice of dual process guard and keeping alive in IM instant messaging development

Huawei partners and Developers Conference 2022 | Kirin software cooperates with Huawei to jointly build the computing industry and create a digital intelligence future

MySQL - function

Ten thousand words long article understanding business intelligence (BI) | recommended collection
随机推荐
lefse分析本地实现方法带全部安装文件和所有细节,保证成功。
How to study efficiently
Xctf attack and defense world misc wage earner advanced zone
SQL Server 2016 detailed installation tutorial (with registration code and resources)
要搞清楚什么是同步,异步,串行,并行,并发,进程,线程,协程
Meituan dynamic thread pool practice idea has been open source
How about the market application strength of large-size conductive slip rings
[Yocto RM]9 - QA Error and Warning Messages
Import the data table in MySQL into Excel
What is digitalization? What is digital transformation? Why do enterprises choose digital transformation?
【DNS 解析】将Name.com的域名接入DNSPod解析
【嵌入式基础】内存(Cache,RAM,ROM,Flash)
[embedded foundation] serial port communication
【开源】开源系统整理-考试问卷等
[Yocto RM]8 - OpenEmbedded Kickstart (.wks) Reference
Adobe Premiere基础-编辑素材文件常规操作(脱机文件,替换素材,素材标签和编组,素材启用,便捷调节不透明度,项目打包)(十七)
【牛客讨论区】第四章:Redis
Deepmind | pre training of molecular property prediction through noise removal
界面组件Telerik UI for WPF入门指南 - 如何使用主题切换自定义样式
数据人面试指南 | 准备好这几点做到有备无患!
