Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
chenpangpang
transformers
Commits
cf416764
Unverified
Commit
cf416764
authored
Jan 11, 2021
by
Julien Plu
Committed by
GitHub
Jan 11, 2021
Browse files
Fix template (#9504)
parent
09926c8e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
5 deletions
+1
-5
templates/adding_a_new_model/cookiecutter-template-{{cookiecutter.modelname}}/modeling_tf_{{cookiecutter.lowercase_modelname}}.py
...ame}}/modeling_tf_{{cookiecutter.lowercase_modelname}}.py
+1
-5
No files found.
templates/adding_a_new_model/cookiecutter-template-{{cookiecutter.modelname}}/modeling_tf_{{cookiecutter.lowercase_modelname}}.py
View file @
cf416764
...
...
@@ -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
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment