adding T5 model

This commit is contained in:
thomwolf
2019-11-05 16:40:29 +01:00
parent 60a5babd57
commit 568c0ffb7e
2 changed files with 412 additions and 63 deletions

View File

@@ -217,9 +217,7 @@ class PreTrainedEncoderDecoder(nn.Module):
encoder_hidden_states = kwargs_encoder.pop("hidden_states", None)
if encoder_hidden_states is None:
encoder_outputs = self.encoder(encoder_input_ids, **kwargs_encoder)
encoder_hidden_states = encoder_outputs[
0
] # output the last layer hidden state
encoder_hidden_states = encoder_outputs[0]
else:
encoder_outputs = ()