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
#我在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:
#我在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",
#我在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: