-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Size mismatch error #6
Comments
I had the same issue, I suppose you tried the bi-objective search code with the argument
resolves your problem. |
Did you encounter this kind of error again when searching? An error is reported when the configured ofa version is ofa 0.1.0-202012082159. Then try ofa 0.0.4-2012082155 but the same error still occurs. |
@euminds - I had plenty of imports errors related with ofa. |
Thanks. I will try. |
Traceback (most recent call last):
File "msunas.py", line 355, in
main(cfgs)
File "msunas.py", line 310, in main
engine.search()
File "msunas.py", line 83, in search
candidates, c_top1_err_pred = self._next(archive, acc_predictor, self.n_iter)
File "msunas.py", line 197, in _next
{'n_classes': self.n_classes, 'model_path': self.supernet_path})
File "msunas.py", line 266, in init
n_classes=supernet['n_classes'], model_path=supernet['model_path'])
File "C:\Users\hp\nsganetv2-master\evaluator.py", line 102, in init
self.engine.load_weights_from_net(init)
File "E:\Installed_Softwares\lib\site-packages\ofa\elastic_nn\networks\ofa_mbv3.py", line 211, in load_weights_from_net
self.load_state_dict(model_dict)
File "E:\Installed_Softwares\lib\site-packages\torch\nn\modules\module.py", line 1052, in load_state_dict
self.class.name, "\n\t".join(error_msgs)))
RuntimeError: Error(s) in loading state_dict for OFAMobileNetV3:
size mismatch for classifier.linear.weight: copying a param with shape torch.Size([1000, 1280]) from checkpoint, the shape in current model is torch.Size([10, 1280]).
size mismatch for classifier.linear.bias: copying a param with shape torch.Size([1000]) from checkpoint, the shape in current model is torch.Size([10]).
The text was updated successfully, but these errors were encountered: