Closed chinmaychinara91 closed 3 years ago
Hi,
Have you successfully download the trained model? I searched for this problem and guess the downloaded file is corrupt, just like this discussion. Or you can directly train a new model, it will take about half a day on a single GPU.
Hi, @chinmaychinara91
"PATH_TO_WEIGHTS" should be the path to the model you trained or downloaded.
@Blueprintf I did do my own training and followed the process in the discussion link you suggested. Still I get the same error.
@Xinjiann Yes I did do that but still no luck.
@chinmaychinara91 I didn't meet this problem before, the structure of the saved model can be found in there. You can try to load the 'model.state_dict()' only to diagnose the problem better.
Alright thanks a lot. Let me see what I can do.
HI,
I tried running the command for inference:
python main.py --phase=test --work-dir=PATH_TO_SAVE_RESULTS --device=0 --weights=PATH_TO_WEIGHTS
but I get the error:
Loading model Loading pretrained model... Traceback (most recent call last): File "main.py", line 226, in <module> processor = Processor(args) File "main.py", line 27, in __init__ self.model, self.optimizer = self.Loading() File "main.py", line 90, in Loading state_dict = torch.load(self.arg.weights) File "/home/ICT2000/cchinara/anaconda2/envs/tf_gpu_190/lib/python3.6/site-packages/torch/serialization.py", line 387, in load return _load(f, map_location, pickle_module, **pickle_load_args) File "/home/ICT2000/cchinara/anaconda2/envs/tf_gpu_190/lib/python3.6/site-packages/torch/serialization.py", line 564, in _load magic_number = pickle_module.load(f, **pickle_load_args) _pickle.UnpicklingError: unpickling stack underflow
Let me know what needs to be done.