EDSR-PyTorch
EDSR-PyTorch copied to clipboard
AttributeError: module 'torch.backends' has no attribute 'mps'
我用作者预训练的模型去测试,出现
(base) root@autodl-container-815011ba52-c31a7ebc:~/autodl-tmp/EDSR-PyTorch/src# python main.py --data_test Demo --scale 2 --n_resblocks 32 --n_feats 256 --res_scale 0.1 --pre_train ../experiment/model/EDSR_x2.pt --test_only --save_results
Making model...
Traceback (most recent call last):
File "main.py", line 33, in
看一下你是否是下载的gpu版本的torch,查看一些torch的版本和cuda的版本是否匹配.如果cuda版本过低,也可以尝试升级一些cuda版本,比如升级到11.6。如果你想测试基本集Set5,可以使用这个命令python main.py --data_test Set5 --data_range 801-900 --scale 4 --n_resblocks 32 --n_feats 256 --res_scale 0.1 --pre_train download --test_only --self_ensemble。如果你使用上述命令报错的话,基本是你测试集的位置没放对,可以在option.py里面直接使用绝对路径,将你的测试集放进去