Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RuntimeError: PytorchStreamReader failed reading zip archive: failed finding central directory #26

Open
adeljalalyousif opened this issue Jun 25, 2022 · 1 comment

Comments

@adeljalalyousif
Copy link

Hi, I get this error while trying to run main.py

runfile('D:/COCO/imge_captioning_transform_github/1/catr-master/main.py', wdir='D:/COCO/imge_captioning_transform_github/1/catr-master')
Reloaded modules: datasets, datasets.utils, datasets.coco, configuration, engine
Initializing Device: cuda
Traceback (most recent call last):

File D:\COCO\imge_captioning_transform_github\1\catr-master\main.py:90 in
main(config)

File D:\COCO\imge_captioning_transform_github\1\catr-master\main.py:23 in main
model, criterion = caption.build_model(config)

File ~\Desktop\models\caption.py:51 in build_model

File ~\Desktop\models\backbone.py:112 in build_backbone

File ~\Desktop\models\backbone.py:85 in init

File ~\anaconda3\envs\my_envir_gpu\lib\site-packages\torchvision\models\resnet.py:342 in resnet101
return _resnet("resnet101", Bottleneck, [3, 4, 23, 3], pretrained, progress, **kwargs)

File ~\anaconda3\envs\my_envir_gpu\lib\site-packages\torchvision\models\resnet.py:296 in _resnet
state_dict = load_state_dict_from_url(model_urls[arch], progress=progress)

File ~\anaconda3\envs\my_envir_gpu\lib\site-packages\torch\hub.py:595 in load_state_dict_from_url
return torch.load(cached_file, map_location=map_location)

File ~\anaconda3\envs\my_envir_gpu\lib\site-packages\torch\serialization.py:705 in load
with _open_zipfile_reader(opened_file) as opened_zipfile:

File ~\anaconda3\envs\my_envir_gpu\lib\site-packages\torch\serialization.py:243 in init
super(_open_zipfile_reader, self).init(torch._C.PyTorchFileReader(name_or_buffer))

RuntimeError: PytorchStreamReader failed reading zip archive: failed finding central directory

Can you tell me where I should change in the code to fix this error?

@adeljalalyousif
Copy link
Author

I replaced resnet101 with resnet50 and work

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant