Skip to content
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

some errors about loading pretrained model #12

Closed
qk-huang opened this issue Oct 10, 2018 · 2 comments
Closed

some errors about loading pretrained model #12

qk-huang opened this issue Oct 10, 2018 · 2 comments

Comments

@qk-huang
Copy link

Hi, when I loaded the detectron_100_resnet_most_data model, some problems happened:

While copying the parameter named "module.image_embedding_models_list.0.0.image_attention_model.modal_combine.Fa_image.main.0.weight_g", whose dimensions in the model are torch.Size([]) and whose dimensions in the checkpoint are torch.Size([1]). While copying the parameter named "module.image_embedding_models_list.0.0.image_attention_model.modal_combine.Fa_txt.main.0.weight_g", whose dimensions in the model are torch.Size([]) and whose dimensions in the checkpoint are torch.Size([1]).

I think might weight_norm caused it, but I don't know the reason. Can you give me some advices.

@YuJiang01
Copy link
Contributor

@Ken-Con which version of pytorch are you using?

@qk-huang
Copy link
Author

@YuJiang01 pytorch 0.4.0. I have found the problem, because my pytorch creates a different type for weight_norm parameter. Just need to convert single element tensor to scalar type by use a = a[0].

apsdehal pushed a commit that referenced this issue Apr 23, 2019
1) Add support Bert Embedding Extraction, (#12)
2) Generic pretrained embedding loading
3) Restructure base_model to abstract away text embedding init
4) Question id is now passed in data sample meta info
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants