Skip to content
This repository has been archived by the owner on Dec 16, 2022. It is now read-only.

Commit

Permalink
fix decode in encoder decoder (#586)
Browse files Browse the repository at this point in the history
  • Loading branch information
DeNeutoy authored Dec 7, 2017
1 parent d978101 commit ccc4af3
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions allennlp/models/encoder_decoders/simple_seq2seq.py
Original file line number Diff line number Diff line change
Expand Up @@ -280,8 +280,6 @@ def decode(self, output_dict: Dict[str, torch.Tensor]) -> Dict[str, torch.Tensor
predicted_tokens = [self.vocab.get_token_from_index(x, namespace="target_tokens")
for x in indices]
all_predicted_tokens.append(predicted_tokens)
if len(all_predicted_tokens) == 1:
all_predicted_tokens = all_predicted_tokens[0] # type: ignore
output_dict["predicted_tokens"] = all_predicted_tokens
return output_dict

Expand Down

0 comments on commit ccc4af3

Please sign in to comment.