zgcr/SimpleAICV_pytorch_training_examples

pretrained问题

kike-0304 opened this issue · 1 comments

我把pretrained设置为True之后,出现如下错误,请问我该如何解决?

Setting OMP_NUM_THREADS environment variable for each process to be 1 in default, to avoid your system being overloaded, please further tune the variable for optimal performance in your application as needed.


Traceback (most recent call last):

File "../../../tools/train_detection_model.py", line 205, in

main()

File "../../../tools/train_detection_model.py", line 46, in main

from train_config import config

File "./train_config.py", line 19, in

class config:

File "./train_config.py", line 28, in config

'num_classes': num_classes,

File "/home/cc631/hailong/code/Dilated-FPN/simpleAICV-pytorch-ImageNet-COCO-training/simpleAICV/detection/models/retinanet.py", line 145, in resnet50_retinanet

return _retinanet('resnet50', pretrained, **kwargs)

File "/home/cc631/hailong/code/Dilated-FPN/simpleAICV-pytorch-ImageNet-COCO-training/simpleAICV/detection/models/retinanet.py", line 131, in _retinanet

map_location=torch.device('cpu')), model)

File "/home/cc631/anaconda3/envs/pytorch1.7/lib/python3.7/site-packages/torch/serialization.py", line 581, in load

with _open_file_like(f, 'rb') as opened_file:

File "/home/cc631/anaconda3/envs/pytorch1.7/lib/python3.7/site-packages/torch/serialization.py", line 230, in _open_file_like

return _open_file(name_or_buffer, mode)

File "/home/cc631/anaconda3/envs/pytorch1.7/lib/python3.7/site-packages/torch/serialization.py", line 211, in init

super(_open_file, self).init(open(name, mode))

FileNotFoundError: [Errno 2] No such file or directory: 'empty'

zgcr commented

我把pretrained设置为True之后,出现如下错误,请问我该如何解决?

Setting OMP_NUM_THREADS environment variable for each process to be 1 in default, to avoid your system being overloaded, please further tune the variable for optimal performance in your application as needed.

Traceback (most recent call last):

File "../../../tools/train_detection_model.py", line 205, in

main()

File "../../../tools/train_detection_model.py", line 46, in main

from train_config import config

File "./train_config.py", line 19, in

class config:

File "./train_config.py", line 28, in config

'num_classes': num_classes,

File "/home/cc631/hailong/code/Dilated-FPN/simpleAICV-pytorch-ImageNet-COCO-training/simpleAICV/detection/models/retinanet.py", line 145, in resnet50_retinanet

return _retinanet('resnet50', pretrained, **kwargs)

File "/home/cc631/hailong/code/Dilated-FPN/simpleAICV-pytorch-ImageNet-COCO-training/simpleAICV/detection/models/retinanet.py", line 131, in _retinanet

map_location=torch.device('cpu')), model)

File "/home/cc631/anaconda3/envs/pytorch1.7/lib/python3.7/site-packages/torch/serialization.py", line 581, in load

with _open_file_like(f, 'rb') as opened_file:

File "/home/cc631/anaconda3/envs/pytorch1.7/lib/python3.7/site-packages/torch/serialization.py", line 230, in _open_file_like

return _open_file(name_or_buffer, mode)

File "/home/cc631/anaconda3/envs/pytorch1.7/lib/python3.7/site-packages/torch/serialization.py", line 211, in init

super(_open_file, self).init(open(name, mode))

FileNotFoundError: [Errno 2] No such file or directory: 'empty'

你好,由于我之前将整个项目重写了一次,网络写法有所变化,所以现在只提供resnet在imagenet上的预训练模型,其他模型现在没有。