YufeiWang777 / LRRU

Official implementation of ``LRRU: Long-short Range Recurrent Updating Networks for Depth Completion'', ICCV 2023.
83 stars 4 forks source link

question about loading model #17

Closed harborsarah closed 5 months ago

harborsarah commented 6 months ago

Dear authors,

Thanks a lot for the excellent work. I have a question regarding the code. I tried to train the model using my data, and the model was saved in the folder ('latest_model.pt'). However, when I tried to load and validate it using python val.py -c val_lrru_base_kitti.yml, this error pops up.

Unexpected key(s) in state_dict: "net", "optimizer", "scheduler", "amp", "epoch", "log_itr", "args".

Do you have any idea about how does this happens? (I didn't change any model architecture, and the config file I also just change the crop size, nothing else)

Thanks a lot for your help.

YufeiWang777 commented 6 months ago

Hi, you should check if the 'latest_model.pt' has the key, such as "net", "optimizer", "scheduler", "amp", "epoch", "log_itr", "args". And, change the following path in val_lrru_base_kitti.yml.

"test_dir: './pretrained/LRRU_Base' test_model: './pretrained/LRRU_Base/LRRU_Base.pt'"