-
Notifications
You must be signed in to change notification settings - Fork 36
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
请问为什么加载的权重是错的:RuntimeError: Error(s) in loading state_dict for MoGaA: #8
Comments
varify.py 的载入方式如下:
|
#我在MoGa_A.py的末尾加上这几句话,如果备注#model.load_state_dict那么是可以正常运行的,但是加载权重就报错了
if name == 'main':
from torchsummary import summary
model = MoGaA()
model.load_state_dict(torch.load('MoGaA.pth.tar'))#加载权重
summary(model,(3,224,224))
#RuntimeError: Error(s) in loading state_dict for MoGaA:
Missing key(s) in state_dict: "stem.0.weight", "stem.1.weight", "stem.1.bias",
The text was updated successfully, but these errors were encountered: