This repository was archived by the owner on Dec 16, 2022. It is now read-only.
This repository was archived by the owner on Dec 16, 2022. It is now read-only.
Closed
Description
Describe the bug
The final hidden states for shorter sequences are set to 0 when using the the simple_seq2seq model, with the configuration at https://github.com/allenai/allennlp/blob/master/allennlp/tests/fixtures/encoder_decoder/simple_seq2seq/experiment_with_attention.json
To Reproduce
Steps to reproduce the behavior
- run the simple_seq2seq model, with a batch where not everything is the same length
- Right here, the hidden states for short sequences are set to 0
Expected behavior
The final_encoder_output needs to be the encoder output at the last valid timestep.
System (please complete the following information):
- OS: Linux
- Python version: 3.6.6 [if it's not 3.6.1 or later, that's probably your problem]
- AllenNLP version: 0.6.1
- PyTorch version: installed with allennlp
Additional context
Possibly using a different encoder would fix the problem? or maybe I'm doing something wrong elsewhere
Metadata
Metadata
Assignees
Labels
No labels