semantic-segmentation-pytorch icon indicating copy to clipboard operation
semantic-segmentation-pytorch copied to clipboard

AssertionError: Torch not compiled with CUDA enabled

Open thomashsia opened this issue 5 years ago • 0 comments

Dear all, I am trying to the Section "Quick start: Test on an image using our trained model".

[2020-06-09 12:28:55,641 INFO test.py line 172 138659] Loaded configuration file config/ade20k-resnet50dilated-ppm_deepsup.yaml [2020-06-09 12:28:55,642 INFO test.py line 173 138659] Running with config: DATASET: imgMaxSize: 1000 imgSizes: (300, 375, 450, 525, 600) list_train: ./data/training.odgt list_val: ./data/validation.odgt num_class: 150 padding_constant: 8 random_flip: True root_dataset: ./data/ segm_downsampling_rate: 8 DIR: ade20k-resnet50dilated-ppm_deepsup MODEL: arch_decoder: ppm_deepsup arch_encoder: resnet50dilated fc_dim: 2048 weights_decoder: weights_encoder: TEST: batch_size: 1 checkpoint: epoch_20.pth result: ./ TRAIN: batch_size_per_gpu: 2 beta1: 0.9 deep_sup_scale: 0.4 disp_iter: 20 epoch_iters: 5000 fix_bn: False lr_decoder: 0.02 lr_encoder: 0.02 lr_pow: 0.9 num_epoch: 20 optim: SGD seed: 304 start_epoch: 0 weight_decay: 0.0001 workers: 16 VAL: batch_size: 1 checkpoint: epoch_20.pth visualize: False Loading weights for net_encoder Loading weights for net_decoder

samples: 1 Traceback (most recent call last): File "test.py", line 198, in main(cfg, args.gpu) File "test.py", line 125, in main segmentation_module.cuda() File "/home/thomas/anaconda3/envs/env37/lib/python3.7/site-packages/torch/nn/modules/module.py", line 307, in cuda return self._apply(lambda t: t.cuda(device)) File "/home/thomas/anaconda3/envs/env37/lib/python3.7/site-packages/torch/nn/modules/module.py", line 203, in _apply module._apply(fn) File "/home/thomas/anaconda3/envs/env37/lib/python3.7/site-packages/torch/nn/modules/module.py", line 203, in _apply module._apply(fn) File "/home/thomas/anaconda3/envs/env37/lib/python3.7/site-packages/torch/nn/modules/module.py", line 225, in _apply param_applied = fn(param) File "/home/thomas/anaconda3/envs/env37/lib/python3.7/site-packages/torch/nn/modules/module.py", line 307, in return self._apply(lambda t: t.cuda(device)) File "/home/thomas/anaconda3/envs/env37/lib/python3.7/site-packages/torch/cuda/init.py", line 149, in _lazy_init _check_driver() File "/home/thomas/anaconda3/envs/env37/lib/python3.7/site-packages/torch/cuda/init.py", line 47, in _check_driver raise AssertionError("Torch not compiled with CUDA enabled") AssertionError: Torch not compiled with CUDA enabled

And my laptop is Ubuntu 20.04 without GPU. How can I fix this issue? Many thanks!

thomashsia avatar Jun 09 '20 14:06 thomashsia