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 #46

Closed
liaopan-lp opened this issue Jun 7, 2023 · 2 comments

Comments

@liaopan-lp
Copy link

when I run python train.py --data_path /mypath --model_name mytrain --num_epochs 30 --batch_size 12 --mypretrain ./weight/lite-mono-8m_1024x320 --lr 0.0001 5e-6 31 0.0001 1e-5 31,
that display "Traceback (most recent call last):
File "E:\qitaxiangmu\Lite-Mono\train.py", line 11, in
trainer = Trainer(opts)
File "E:\qitaxiangmu\Lite-Mono\trainer.py", line 71, in init
self.models_pose["pose_encoder"] = networks.ResnetEncoder(
File "E:\qitaxiangmu\Lite-Mono\networks\resnet_encoder.py", line 76, in init
self.encoder = resnet_multiimage_input(num_layers, pretrained, num_input_images)
File "E:\qitaxiangmu\Lite-Mono\networks\resnet_encoder.py", line 48, in resnet_multiimage_input
loaded = model_zoo.load_url(models.resnet.model_urls['resnet{}'.format(num_layers)])
File "E:\qitaxiangmu\Track-Anything\venv\lib\site-packages\torch\hub.py", line 735, in load_state_dict_from_url
return torch.load(cached_file, map_location=map_location)
File "E:\qitaxiangmu\Track-Anything\venv\lib\site-packages\torch\serialization.py", line 777, in load
with _open_zipfile_reader(opened_file) as opened_zipfile:
File "E:\qitaxiangmu\Track-Anything\venv\lib\site-packages\torch\serialization.py", line 282, in init
super(_open_zipfile_reader, self).init(torch._C.PyTorchFileReader(name_or_buffer))"

@noahzn
Copy link
Owner

noahzn commented Jun 7, 2023

Hi, if you set --mypretrain you should input an ImageNet pre-trained file. So you should use something like this --mypretrain ./weight/lite-mono-8m-pretrain.pth

@liaopan-lp
Copy link
Author

Thank you. This problem should be caused by my network problem

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

2 participants