8000 possible masking bug in simple_seq2seq · Issue #1713 · allenai/allennlp · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
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.
possible masking bug in simple_seq2seq #1713
Closed
@rowanz

Description

@rowanz

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

  1. run the simple_seq2seq model, with a batch where not everything is the same length
  2. Right here,
    final_encoder_output = encoder_outputs[:, -1] # (batch_size, encoder_output_dim)
    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
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    0