You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thanks for your code sharing,when I run python train.py --dataset ucf101-24 --data_cfg cfg/ucf24.data --cfg_file cfg/ucf24.cfg --n_classes 24 --backbone_3d resnext101 --backbone_2d darknet --backbone_2d_weights weights/yolo.weights - -resume_path weights/yowo_ucf101-24_16f_best.pth
shown in terminal
RuntimeError: Error(s) in loading state_dict for YOWO:
Missing key(s) in state_dict: "backbone_2d.models.0.conv1.weight", "backbone_2d.models.0.bn1.weight",
The text was updated successfully, but these errors were encountered:
i would suggest loading the state dict and print the keys of the weights. Most probably since the authors used multigpu training (dataparallel module) , the pretrained weights keys have something like "module." prepended to the keys. Probably the less hacky way to do this is to use the same dataparallel module.
I think for your case, you can just load the state dict, iterate over the keys and values, and write another state dict with the corrected keys. THen you load the corrected state dict. This is a bit hacky but it worked for me.
Thanks for your code sharing,when I run
python train.py --dataset ucf101-24 --data_cfg cfg/ucf24.data --cfg_file cfg/ucf24.cfg --n_classes 24 --backbone_3d resnext101 --backbone_2d darknet --backbone_2d_weights weights/yolo.weights - -resume_path weights/yowo_ucf101-24_16f_best.pth
shown in terminal
The text was updated successfully, but these errors were encountered: