vc-bonn / Spline_PINN

91 stars 21 forks source link

_pickle.UnpicklingError: invalid load key, 'v'. #4

Closed CongWang-hnu closed 2 years ago

CongWang-hnu commented 2 years ago

Hello,I have a problem with the command “python fluid_test.py --net=Fluid_model --hidden_size=50 --mu=0.1 --rho=10 --cuda=f”.Can you help me? Traceback (most recent call last): File "fluid_test.py", line 68, in date_time,index = logger.load_state(model,None,datetime=params.load_date_time,index=params.load_index) File "E:\mynewjob\Spline-PINN\Spline_PINN-main\Logger.py", line 194, in load_state state = torch.load(path) File "D:\Users\WangCong\anaconda3\envs\my_cool_fluid_env\lib\site-packages\torch\serialization.py", line 713, in load return _legacy_load(opened_file, map_location, pickle_module, pickle_load_args) File "D:\Users\WangCong\anaconda3\envs\my_cool_fluid_env\lib\site-packages\torch\serialization.py", line 920, in _legacy_load magic_number = pickle_module.load(f, pickle_load_args) _pickle.UnpicklingError: invalid load key, 'v'.

wandeln commented 2 years ago

Hi, I never encountered this problem, but I found the following post on a problem that seems very similar: https://github.com/YBIGTA/pytorch-hair-segmentation/issues/38 ... did you use git-lfs? (It is needed to download our pretrained models) Let me know if this link solved your problems :) Best regards! Nils

CongWang-hnu commented 2 years ago

Problem solved, thanks