From cf416764f4d08bd24dc625a706e0ad7540ffd2c0 Mon Sep 17 00:00:00 2001 From: Julien Plu Date: Mon, 11 Jan 2021 11:21:25 +0100 Subject: [PATCH] Fix template (#9504) --- .../modeling_tf_{{cookiecutter.lowercase_modelname}}.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/templates/adding_a_new_model/cookiecutter-template-{{cookiecutter.modelname}}/modeling_tf_{{cookiecutter.lowercase_modelname}}.py b/templates/adding_a_new_model/cookiecutter-template-{{cookiecutter.modelname}}/modeling_tf_{{cookiecutter.lowercase_modelname}}.py index 90b554574c..799835bfcb 100644 --- a/templates/adding_a_new_model/cookiecutter-template-{{cookiecutter.modelname}}/modeling_tf_{{cookiecutter.lowercase_modelname}}.py +++ b/templates/adding_a_new_model/cookiecutter-template-{{cookiecutter.modelname}}/modeling_tf_{{cookiecutter.lowercase_modelname}}.py @@ -782,11 +782,7 @@ class TF{{cookiecutter.camelcase_modelname}}Model(TF{{cookiecutter.camelcase_mod hs = tf.convert_to_tensor(output.hidden_states) if self.config.output_hidden_states else None attns = tf.convert_to_tensor(output.attentions) if self.config.output_attentions else None - return TFBaseModelOutput( - last_hidden_state=output.last_hidden_state, - hidden_states=hs, - attentions=attns, - ) + return TFBaseModelOutput(last_hidden_state=output.last_hidden_state, hidden_states=hs, attentions=attns) @add_start_docstrings("""{{cookiecutter.modelname}} Model with a `language modeling` head on top. """, {{cookiecutter.uppercase_modelname}}_START_DOCSTRING)