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
File "*/CompOFA/eval_sampled_config.py", line 85, in <module>
net.load_weights_from_net(torch.load(args.net, map_location='cpu')['state_dict'])
File "*/CompOFA/ofa/elastic_nn/networks/ofa_mbv3.py", line 215, in load_weights_from_net
raise ValueError(key)
ValueError: blocks.1.mobile_inverted_conv.depth_conv.conv.5to3_matrix
Could you tell me how to solve this problem?
The text was updated successfully, but these errors were encountered:
I have the same problem. And the way I overcome it is that I modified the load_weights_from_net() function in ofa_mbv3.py from for key in src_model_dict: if key in model_dict:
to be for key in model_dict: if key in src_model_dict:
Hope it help!
Those stray keys can be ignored when loading fixed kernel models, and this has now been fixed in #4
Reading keys from model_dict would bypass the key transformations for other keys (if conditions in later lines), I haven't checked how that affects those cases.
An error occurs when loading pre-trained weight file (saved in ofa/checkpoints) to Comp-OFAMobileNetV3 net.
The error is:
Could you tell me how to solve this problem?
The text was updated successfully, but these errors were encountered: