当前位置:网站首页>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)
边栏推荐
- Réseau neuronal pour la solution détaillée Multi - diagrammes de fondation zéro
- Drug interaction prediction based on learning size adaptive molecular substructure
- AI+临床试验患者招募|Massive Bio完成900万美元A轮融资
- 如何高效读书学习
- Adobe Premiere基础-常用的视频特效(边角定位,马赛克,模糊,锐化,手写工具,效果控件层级顺序)(十六)
- Evaluation - rank sum ratio comprehensive evaluation
- 766. 托普利茨矩阵
- Modular development
- Supervised, unsupervised and semi supervised learning
- Zhang Fan: the attribution of flying pig after advertising based on causal inference technology
猜你喜欢

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

基于AM335X开发板 ARM Cortex-A8——Acontis EtherCAT主站开发案例

Deepmind | pre training of molecular property prediction through noise removal

什麼是數字化?什麼是數字化轉型?為什麼企業選擇數字化轉型?

N methods of data De duplication using SQL

Data analysts too hot? Monthly income 3W? Tell you the true situation of this industry with data

【嵌入式基础】内存(Cache,RAM,ROM,Flash)

What is digitalization? What is digital transformation? Why do enterprises choose digital transformation?

Xctf attack and defense world misc wage earner advanced zone

What is a through-hole conductive slip ring?
随机推荐
Interview guide for data person | prepare these points to be prepared!
Google Earth engine (GEE) -- an error caused by the imagecollection (error) traversing the image collection
SQL Server 2016 detailed installation tutorial (with registration code and resources)
What are the requirements for customizing the slip ring for UAV
Comprehensive evaluation of free, easy-to-use and powerful open source note taking software
[embedded foundation] memory (cache, ram, ROM, flash)
How to read a paper
Golang monkeys eat peaches and ask for the number of peaches on the first day
什么是数字化?什么是数字化转型?为什么企业选择数字化转型?
Summary of attack methods of attack team
AI+临床试验患者招募|Massive Bio完成900万美元A轮融资
How to understand query, key and value in transformer
同花顺股票开户是会有什么风险吗?同花顺开户安全吗
PostgreSQL setting auto increment field
PV operation primitive
. Mp4 video test address
Proe/creo product structure design - continuous research
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
What problems should be evaluated before implementing MES management system
Arrays. Aslist() pit
