Closed 283pm closed 1 year ago
Hi @283pm, did you try replacing the 'model_state_dict' with 'depth_model'?
Yes, I did.
If I replace "model_state_dict" with "depth_model", I got the following error.
RuntimeError: Error(s) in loading state_dict for RelDepthModel: Missing key(s) in state_dict: "depth_model.encoder_modules.encoder.conv1.weight", --- many weights and biases --- "depth_model.auxi_modules.out_conv.adapt_conv.3.bias". Unexpected key(s) in state_dict: "shift_model", "focal_model".
@283pm I have made some modifications in a new fork
. Give it a try to see if it can work for you.
Your modifications solved my problem. Thank you.
Thanks for the great repository. I ran the Train.sh file for fine tuning with the original data from the res50.pth file and got the following error. How can I solve this error?
Thank you
Traceback (most recent call last): File "../tools/train.py", line 290, in
main()
File "../tools/train.py", line 286, in main
main_worker(0, ngpus_per_node, train_args, val_args)
File "../tools/train.py", line 221, in main_worker
load_ckpt(train_args, model, optimizer.optimizer, scheduler, val_err)
File "/home/robotics/AdelaiDepth/LeReS/Train/lib/utils/net_tools.py", line 44, in load_ckpt
checkpoint_state_dict_noprefix = strip_prefix_if_present(checkpoint['model_state_dict'], "module.")
KeyError: 'model_state_dict'