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

ptr_UNK network failed. #19

Closed
Abbyyan opened this issue Mar 30, 2019 · 1 comment
Closed

ptr_UNK network failed. #19

Abbyyan opened this issue Mar 30, 2019 · 1 comment

Comments

@Abbyyan
Copy link

Abbyyan commented Mar 30, 2019

When i run the ptr_UNK network,
it cause a interrupt in decoder's forward function
dimension out of range (expected to be in range of [-1, 0], but got 1)
with this line
v = self.v.repeat(encoder_outputs.data.shape[0],1).unsqueeze(1)

@Abbyyan
Copy link
Author

Abbyyan commented Mar 30, 2019

this have been solved by change
rnn_input = torch.cat((word_embedded, context.squeeze()), 1).unsqueeze(0)
to

rnn_input = torch.cat((word_embedded, context.squeeze(1)), 1).unsqueeze(0)
Thanks a lot !

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