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

Issues in lstm.py -> AttentionLayer -> score #1

Open
404dreamer opened this issue Mar 5, 2023 · 0 comments
Open

Issues in lstm.py -> AttentionLayer -> score #1

404dreamer opened this issue Mar 5, 2023 · 0 comments

Comments

@404dreamer
Copy link

Line 171 (within forward), self.score was called. encoder_out is in the shape of [batch_size, src_time_steps, output_dims]. Then, moving to the score function, projected_encoder_out is obtained by a linear layer [input_dims, output_dims]. However, the dimension of encoder_out is output_dims; it should be incorrect when pushing a tensor in the output_dims to a linear layer requiring the input of input_dims. Within the class of LSTMdecoder, the attention is built with the same input_dims and output_dims; hence, the file can run, but it is not logically correct.

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