OmidPoursaeed / Generative_Adversarial_Perturbations

Generative Adversarial Perturbations (CVPR 2018)
https://arxiv.org/abs/1712.02328
135 stars 22 forks source link

Pretrained model loading error when running GAP_seg.py #9

Closed haichaoyu closed 4 years ago

haichaoyu commented 4 years ago

Hi Omid,

Thanks for the great code base first. When I run GAP_seg.py, an error occurs as below

  File "seg.py", line 20, in <module>
    model = create_seg_model(args, n_class)
  File "/home/haichao/projects/gap/gap/models/models.py", line 8, in create_seg_model
    model.initialize(args, n_class)
  File "/home/haichao/projects/gap/gap/models/main_model.py", line 81, in initialize
    checkpoint = torch.load(args.pretrained_cityscapes)
  File "/home/haichao/anaconda3/envs/pt1.1/lib/python3.7/site-packages/torch/serialization.py", 
line 426, in load
    return _load(f, map_location, pickle_module, **pickle_load_args)
  File "/home/haichao/anaconda3/envs/pt1.1/lib/python3.7/site-packages/torch/serialization.py", 
line 613, in _load
    result = unpickler.load()
UnicodeDecodeError: 'utf-8' codec can't decode byte 0x99 in position 0: invalid start byte
srun: error: ifp-09: task 0: Exited with exit code 1

I run the code using PyTorch 1.1 and 1.4. Is it caused by the wrong PyTorch version? Any suggestion? Thanks.

u6630774 commented 1 year ago

Hi Yu, I have the same issue,how do you solve that?