当前位置:网站首页>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 cuda
perhapstorch 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)
边栏推荐
- Is it safe to open an online futures account?
- Comprehensive evaluation of free, easy-to-use and powerful open source note taking software
- Golang monkeys eat peaches and ask for the number of peaches on the first day
- [Yocto RM]9 - QA Error and Warning Messages
- Review of drug discovery-02-prediction of molecular properties
- 联想拯救者R720如何组建双通道内存
- Interface component telerik UI for WPF Getting Started Guide - how to switch custom styles using themes
- [Niuke discussion area] Chapter 4: redis
- 【开源】开源系统整理-考试问卷等
- What is the application scope and function of the conductive slip ring of single crystal furnace
猜你喜欢
Self supervised learning and drug discovery
基于可学习尺寸自适应分子亚结构的药物相互作用预测
DeepMind | 通过去噪来进行分子性质预测的预训练
[embedded foundation] memory (cache, ram, ROM, flash)
N methods of data De duplication using SQL
Adobe Premiere foundation - sound adjustment (volume correction, noise reduction, telephone tone, pitch shifter, parameter equalizer) (XVIII)
评价——秩和比综合评价
Solon 1.8.3 release, cloud native microservice development framework
MySQL 18: execution of write statements
药物发现综述-03-分子设计与优化
随机推荐
基于AM335X开发板 ARM Cortex-A8——Acontis EtherCAT主站开发案例
What is the application scope and function of the conductive slip ring of single crystal furnace
ionic4实现半星评分
美团动态线程池实践思路已开源
一张图弄懂 MIT,BSD,Apache几种开源协议之间的区别
Esxi based black Qunhui DSM 7.0.1 installation of VMware Tools
模块化开发
【MySQL】-【函数】
Maimai hot post: Why are big factories keen on making wheels?
Adobe Premiere Basics - common video effects (cropping, black and white, clip speed, mirroring, lens halo) (XV)
AI+临床试验患者招募|Massive Bio完成900万美元A轮融资
界面组件Telerik UI for WPF入门指南 - 如何使用主题切换自定义样式
PostgreSQL设置自增字段
SPuG - lightweight automatic operation and maintenance platform
The practice of dual process guard and keeping alive in IM instant messaging development
Want to open an account to buy stock, is it safe to open an account on the Internet?
Zhang Fan: the attribution of flying pig after advertising based on causal inference technology
766. 托普利茨矩阵
The flutter slivereappbar is fully parsed. All the effects you want are here!
学习 pickle