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

Model Loading Error #17

Open
hello1910 opened this issue Nov 21, 2018 · 1 comment
Open

Model Loading Error #17

hello1910 opened this issue Nov 21, 2018 · 1 comment

Comments

@hello1910
Copy link

Sorry for the inconvenience!

my_generator.load_model('checkpoints/generator/checkpoint_biggest') leads to the following error:

RuntimeError: Error(s) in loading state_dict for StackAugmentedRNN:
Missing key(s) in state_dict: "rnn.weight_ih_l0", "rnn.weight_hh_l0", "rnn.bias_ih_l0", "rnn.bias_hh_l0", "rnn.weight_ih_l0_reverse", "rnn.weight_hh_l0_reverse", "rnn.bias_ih_l0_reverse", "rnn.bias_hh_l0_reverse".
Unexpected key(s) in state_dict: "gru.weight_ih_l0", "gru.weight_hh_l0", "gru.bias_ih_l0", "gru.bias_hh_l0".
size mismatch for stack_controls_layer.weight: copying a param of torch.Size([3, 1000]) from checkpoint, where the shape is torch.Size([3, 1500]) in current model.
size mismatch for stack_input_layer.weight: copying a param of torch.Size([100, 1000]) from checkpoint, where the shape is torch.Size([1500, 1500]) in current model.
size mismatch for stack_input_layer.bias: copying a param of torch.Size([100]) from checkpoint, where the shape is torch.Size([1500]) in current model.
size mismatch for encoder.weight: copying a param of torch.Size([45, 500]) from checkpoint, where the shape is torch.Size([45, 1500]) in current model.
size mismatch for decoder.weight: copying a param of torch.Size([45, 1000]) from checkpoint, where the shape is torch.Size([45, 1500]) in current model.

Do you potentially know why this is the case? Thank you!

@hello1910
Copy link
Author

Sorry, I was able to fix the issue by changing the hidden size and stack width like you mentioned.

I also had to change it from an RNN to a GRU to make it work.

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

1 participant