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

The testing problems of trained model #15

Open
jia-web opened this issue Mar 5, 2022 · 1 comment
Open

The testing problems of trained model #15

jia-web opened this issue Mar 5, 2022 · 1 comment

Comments

@jia-web
Copy link

jia-web commented Mar 5, 2022

The dimensions of the input data are shown to be different from the dimensions trained in the model when I test with the trained model.
Why is this happening?

Error: RuntimeError: Error(s) in loading state_dict for GTS:
size mismatch for embedder.embedder.weight: copying a param with shape torch.Size([3349, 128]) from checkpoint, the shape in current model is torch.Size([3322, 128]).

@liamjxu
Copy link

liamjxu commented May 7, 2022

Hi, I had the same error. In my case it was because I tried to load and test a model previously trained on a different dataset (actually a different trainset). This creates the mismatch in the embedding vocab sizes (as in your error message), since the embeddings are created at the initialization of model. See this line.

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