liuzhengzhe / One-Thing-One-Click

https://arxiv.org/abs/2104.02246 One Thing One Click (CVPR 2021) https://arxiv.org/abs/2303.14727 One Thing One Click++ (Arxiv)
54 stars 8 forks source link

Notice on data preparation #19

Open Kaisyouu opened 2 years ago

Kaisyouu commented 2 years ago

Hi, all. @liuzhengzhe Kindly notice that there is something different in torch.save() between torch1.3 and torch1.6+.

Before doing python prepare_data_otoc.py, should modify line 128, add param_use_new_zipfile_serialization=False Otherwise, torch.load('xxx.pth') will raise an error pytorch_model.bin is a zip archive (did you mean to use torch.jit.load()?)

torch1.3 has no param _use_new_zipfile_serialization=False so while preparing the data, your torch should remain ver1.6 or higher, and after generating .pth files, you should go back to torch1.3 or you will find troubles because PG_OP depends on torch1.3.