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
It seems that the model saves the weights in the format net_xxx.pth during training. However, during testing, I made the following modifications according to your method: self.model_t = Namespace() self.model_t.name = 'vit_small_patch16_224_dino' self.model_t.kwargs = dict(pretrained=False, checkpoint_path= 'model/pretrain/net_100.pth', pretrained_strict=False, strict=True, img_size=self.size, teachers=[3, 6, 9], neck=[12]) # self.model_t.kwargs = dict(pretrained=True, checkpoint_path='', strict=True, img_size=self.size, teachers=[3, 6, 9], neck=[12]) self.model_f = Namespace() self.model_f.name = 'fusion' self.model_f.kwargs = dict(pretrained=False, checkpoint_path='', strict=False, dim=384, mul=1) self.model_s = Namespace() self.model_s.name = 'de_vit_small_patch16_224_dino' self.model_s.kwargs = dict(pretrained=False, checkpoint_path='', strict=False, img_size=self.size, students=[3, 6, 9], depth=9) self.model = Namespace() self.model.name = 'vitad' self.model.kwargs = dict(pretrained=False, checkpoint_path='', strict=True, model_t=self.model_t, model_f=self.model_f, model_s=self.model_s)
But an error occurred during execution: RuntimeError: Error(s) in loading state_dict for ViT_Encoder:`,"Clearly, the weight file does not match the model input."。
"Could you please advise me on how to resolve this? Thank you in advance for your response."
The text was updated successfully, but these errors were encountered:
It seems that the model saves the weights in the format net_xxx.pth during training. However, during testing, I made the following modifications according to your method:
self.model_t = Namespace() self.model_t.name = 'vit_small_patch16_224_dino' self.model_t.kwargs = dict(pretrained=False, checkpoint_path= 'model/pretrain/net_100.pth', pretrained_strict=False, strict=True, img_size=self.size, teachers=[3, 6, 9], neck=[12]) # self.model_t.kwargs = dict(pretrained=True, checkpoint_path='', strict=True, img_size=self.size, teachers=[3, 6, 9], neck=[12]) self.model_f = Namespace() self.model_f.name = 'fusion' self.model_f.kwargs = dict(pretrained=False, checkpoint_path='', strict=False, dim=384, mul=1) self.model_s = Namespace() self.model_s.name = 'de_vit_small_patch16_224_dino' self.model_s.kwargs = dict(pretrained=False, checkpoint_path='', strict=False, img_size=self.size, students=[3, 6, 9], depth=9) self.model = Namespace() self.model.name = 'vitad' self.model.kwargs = dict(pretrained=False, checkpoint_path='', strict=True, model_t=self.model_t, model_f=self.model_f, model_s=self.model_s)
But an error occurred during execution:
RuntimeError:
Error(s) in loading state_dict for ViT_Encoder:`,"Clearly, the weight file does not match the model input."。"Could you please advise me on how to resolve this? Thank you in advance for your response."
The text was updated successfully, but these errors were encountered: