求助 pytorch_lightning.utilities.exceptions.MisconfigurationException: You passed `accelerator=‘gpu‘`,

在运行别人代码的时候出现的问题,一直显示我没有gpu,兼容性应该没问题,pytorch3.8和cuda11.2,虚拟机有两块GPU,但是无论是GPU0还是GPU1都无法调用,求教是什么原因导致的

运行命令:python GeoSeg/train_supervision.py -c GeoSeg/config/loveda/unetformer.py

报错描述:Traceback (most recent call last):
  File "GeoSeg/train_supervision.py", line 201, in
    main()
  File "GeoSeg/train_supervision.py", line 193, in main
    trainer = pl.Trainer(devices=config.gpus, max_epochs=config.max_epoch, accelerator='gpu', gpus=0,
  File "/home/pengtl/anaconda3/envs/airs/lib/python3.8/site-packages/pytorch_lightning/trainer/connectors/env_vars_connector.py", line 38, in insert_env_defaults
    return fn(self, **kwargs)
  File "/home/pengtl/anaconda3/envs/airs/lib/python3.8/site-packages/pytorch_lightning/trainer/trainer.py", line 431, in __init__
    self._accelerator_connector = AcceleratorConnector(
  File "/home/pengtl/anaconda3/envs/airs/lib/python3.8/site-packages/pytorch_lightning/trainer/connectors/accelerator_connector.py", line 161, in __init__
    self.select_accelerator_type()
  File "/home/pengtl/anaconda3/envs/airs/lib/python3.8/site-packages/pytorch_lightning/trainer/connectors/accelerator_connector.py", line 228, in select_accelerator_type
    raise MisconfigurationException(f"You passed `accelerator='gpu'`, but {msg}.")
pytorch_lightning.utilities.exceptions.MisconfigurationException: You passed `accelerator='gpu'`, but GPUs are not available.
 

你可能感兴趣的:(pytorch,深度学习,人工智能)