当前位置:网站首页>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)
边栏推荐
- Supervised, unsupervised and semi supervised learning
- The research group of Xuyong and duanwenhui of Tsinghua University has developed an efficient and accurate first principles electronic structure deep learning method and program
- [Yocto RM]9 - QA Error and Warning Messages
- Some habits of making money in foreign lead
- Comprehensive evaluation of free, easy-to-use and powerful open source note taking software
- Adobe Premiere Basics - general operations for editing material files (offline files, replacing materials, material labels and grouping, material enabling, convenient adjustment of opacity, project pa
- 【嵌入式基础】串口通信
- 【开源】开源系统整理-考试问卷等
- Interviewer asked: Inheritance of JS
- 1382. 将二叉搜索树变平衡-常规方法
猜你喜欢
自监督学习与药物发现
Overview of drug discovery-01 overview of drug discovery
面试官问:能否模拟实现JS的new操作符
Maimai hot post: Why are big factories keen on making wheels?
Implementation of timed tasks in laravel framework
Review of drug discovery-03-molecular design and optimization
What is a through-hole conductive slip ring?
什麼是數字化?什麼是數字化轉型?為什麼企業選擇數字化轉型?
The practice of dual process guard and keeping alive in IM instant messaging development
Data analysts too hot? Monthly income 3W? Tell you the true situation of this industry with data
随机推荐
[embedded foundation] serial port communication
Zhang Fan: the attribution of flying pig after advertising based on causal inference technology
[Niuke discussion area] Chapter 4: redis
【开源】开源系统整理-考试问卷等
数据人面试指南 | 准备好这几点做到有备无患!
如何理解 Transformer 中的 Query、Key 与 Value
Google Earth engine (GEE) -- an error caused by the imagecollection (error) traversing the image collection
如何高效读书学习
Meituan dynamic thread pool practice idea has been open source
How to build dual channel memory for Lenovo Savior r720
面试官问:能否模拟实现JS的new操作符
How to understand query, key and value in transformer
声网 VQA:将实时互动中未知的视频画质用户主观体验变可知
PV operation primitive
PostgreSQL设置自增字段
【牛客討論區】第四章:Redis
面试官问:JS的this指向
Interview guide for data person | prepare these points to be prepared!
面试官问:JS的继承
LATEX 表格内容居左,中,右