Hi,
Is there a way to run ./scripts/predict_test.sh
without CUDA?
I am using the LoveDA dataset and pretrained model weights hrnetw32.pth
as described in the ReadME.
Initially I got the error urllib.error.HTTPError: HTTP Error 403: Forbidden
, which I fixed by setting pretrained=False
as recommended here: https://github.com/Junjue-Wang/LoveDA/issues/9.
Then when rerunning the predict_test.sh
, I got the error:
Traceback (most recent call last):
File "predict.py", line 52, in <module>
predict_test(args.ckpt_path, args.config_path, args.out_dir)
File "predict.py", line 38, in predict_test
model.cuda()
File "/Users/kristjan/miniconda3/envs/mip/lib/python3.7/site-packages/torch/nn/modules/module.py", line 680, in cuda
return self._apply(lambda t: t.cuda(device))
File "/Users/kristjan/miniconda3/envs/mip/lib/python3.7/site-packages/torch/nn/modules/module.py", line 570, in _apply
module._apply(fn)
File "/Users/kristjan/miniconda3/envs/mip/lib/python3.7/site-packages/torch/nn/modules/module.py", line 570, in _apply
module._apply(fn)
File "/Users/kristjan/miniconda3/envs/mip/lib/python3.7/site-packages/torch/nn/modules/module.py", line 570, in _apply
module._apply(fn)
File "/Users/kristjan/miniconda3/envs/mip/lib/python3.7/site-packages/torch/nn/modules/module.py", line 593, in _apply
param_applied = fn(param)
File "/Users/kristjan/miniconda3/envs/mip/lib/python3.7/site-packages/torch/nn/modules/module.py", line 680, in <lambda>
return self._apply(lambda t: t.cuda(device))
File "/Users/kristjan/miniconda3/envs/mip/lib/python3.7/site-packages/torch/cuda/__init__.py", line 208, in _lazy_init
raise AssertionError("Torch not compiled with CUDA enabled")
AssertionError: Torch not compiled with CUDA enabled
I then commented out the line 38:
https://github.com/Junjue-Wang/LoveDA/blob/4d574ce08f84cbc8d27becf2bd9dce8fbb7f50f8/Semantic_Segmentation/predict.py#L38
and after rerunning predict_test.sh
, I got the output:
Load model!
INFO:data.loveda:./LoveDA/Val/Urban/images_png -- Dataset images: 0
INFO:data.loveda:./LoveDA/Val/Rural/images_png -- Dataset images: 0
INFO:ever.core.logger:HRNetEncoder: pretrained = False
0it [00:00, ?it/s]
question