AmeryXiong / MixDehazeNet

Code for "MixDehazeNet: Mix Structure block for image dehazing network"
MIT License
59 stars 7 forks source link

When I run the training code I get an error ..... #12

Closed kuacboss closed 5 months ago

kuacboss commented 5 months ago

(dehazeformer):~/MixDehazeNet$ python train.py --model MixDehazeNet-b --dataset RESIDE-IN --exp indoor --save_dir ./save_models/ Traceback (most recent call last): File "train.py", line 94, in network = nn.DataParallel(network).cuda() File "/home/sm/anaconda3/envs/dehazeformer/lib/python3.7/site-packages/torch/nn/modules/module.py", line 680, in cuda return self._apply(lambda t: t.cuda(device)) File "/home/sm/anaconda3/envs/dehazeformer/lib/python3.7/site-packages/torch/nn/modules/module.py", line 570, in _apply module._apply(fn) File "/home/sm/anaconda3/envs/dehazeformer/lib/python3.7/site-packages/torch/nn/modules/module.py", line 570, in _apply module._apply(fn) File "/home/sm/anaconda3/envs/dehazeformer/lib/python3.7/site-packages/torch/nn/modules/module.py", line 570, in _apply module._apply(fn) File "/home/sm/anaconda3/envs/dehazeformer/lib/python3.7/site-packages/torch/nn/modules/module.py", line 593, in _apply param_applied = fn(param) File "/home/sm/anaconda3/envs/dehazeformer/lib/python3.7/site-packages/torch/nn/modules/module.py", line 680, in return self._apply(lambda t: t.cuda(device)) File "/home/sm/anaconda3/envs/dehazeformer/lib/python3.7/site-packages/torch/cuda/init.py", line 214, in _lazy_init torch._C._cuda_init() RuntimeError: No CUDA GPUs are available

(dehazeformer) :~/MixDehazeNet$ nvcc --version nvcc: NVIDIA (R) Cuda compiler driver Copyright (c) 2005-2022 NVIDIA Corporation Built on Wed_Sep_21_10:33:58_PDT_2022 Cuda compilation tools, release 11.8, V11.8.89 Build cuda_11.8.r11.8/compiler.31833905_0 (dehazeformer):~/MixDehazeNet$ nvidia-smi Tue Mar 26 11:07:52 2024
+---------------------------------------------------------------------------------------+ | NVIDIA-SMI 535.161.07 Driver Version: 535.161.07 CUDA Version: 12.2 | |-----------------------------------------+----------------------+----------------------+ | GPU Name Persistence-M | Bus-Id Disp.A | Volatile Uncorr. ECC | | Fan Temp Perf Pwr:Usage/Cap | Memory-Usage | GPU-Util Compute M. | | | | MIG M. | |=========================================+======================+======================| | 0 NVIDIA GeForce RTX 4090 Off | 00000000:01:00.0 Off | Off | | 0% 44C P8 20W / 450W | 18MiB / 24564MiB | 0% Default | | | | N/A | +-----------------------------------------+----------------------+----------------------+

+---------------------------------------------------------------------------------------+ | Processes: | | GPU GI CI PID Type Process name GPU Memory | | ID ID Usage | |=======================================================================================| | 0 N/A N/A 1117 G /usr/lib/xorg/Xorg 4MiB | | 0 N/A N/A 1955 G /usr/lib/xorg/Xorg 4MiB | +---------------------------------------------------------------------------------------+

I didn't touch train.py, so why does this error occur?