Skip to content

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

@404dreamer

Description

@404dreamer

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions