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

RuntimeError when using tie_weights=True #47

Open
palubak opened this issue Jun 16, 2022 · 0 comments
Open

RuntimeError when using tie_weights=True #47

palubak opened this issue Jun 16, 2022 · 0 comments

Comments

@palubak
Copy link

palubak commented Jun 16, 2022

it had RuntimeError when using tie_weights=True. The error was "he expanded size of the tensor (32) must match the existing size (2) at non-singleton dimension 1. Target sizes: [64, 32]. Tensor sizes: [2]".
After checking the code again, i found there was code "self.decoder.weight = self.encoder.weight" in class RNNPredictor() init. decoder.weight was assigned encoder.weight's size. it caused error when using decoder function

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