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
a26536f0
"examples/vscode:/vscode.git/clone" did not exist on "7875b638cdabb3926ee5f0d34c760a22cc1c9c1d"
Unverified
Commit
a26536f0
authored
Jan 14, 2021
by
Julien Plu
Committed by
GitHub
Jan 14, 2021
Browse files
Make logs tf compliant (#9565)
parent
14d677ca
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
src/transformers/modeling_tf_utils.py
src/transformers/modeling_tf_utils.py
+2
-2
No files found.
src/transformers/modeling_tf_utils.py
View file @
a26536f0
...
...
@@ -285,7 +285,7 @@ def booleans_processing(config, **kwargs):
or
kwargs
[
"output_hidden_states"
]
is
not
None
or
(
"use_cache"
in
kwargs
and
kwargs
[
"use_cache"
]
is
not
None
)
):
logger
.
warn
in
g
(
tf
.
pr
in
t
(
"The parameters `output_attentions`, `output_hidden_states` and `use_cache` cannot be updated when calling a model."
"They have to be set to True/False in the config object (i.e.: `config=XConfig.from_pretrained('name', output_attentions=True)`)."
)
...
...
@@ -294,7 +294,7 @@ def booleans_processing(config, **kwargs):
final_booleans
[
"output_hidden_states"
]
=
config
.
output_hidden_states
if
kwargs
[
"return_dict"
]
is
not
None
:
logger
.
warn
in
g
(
"The parameter `return_dict` cannot be set in graph mode and will always be set to `True`."
)
tf
.
pr
in
t
(
"The parameter `return_dict` cannot be set in graph mode and will always be set to `True`."
)
final_booleans
[
"return_dict"
]
=
True
if
"use_cache"
in
kwargs
:
...
...
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