Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
chenpangpang
transformers
Commits
07c2607d
Unverified
Commit
07c2607d
authored
Sep 13, 2021
by
holazzer
Committed by
GitHub
Sep 13, 2021
Browse files
fix use_cache value assign (#13532)
fix use_cache value assign
parent
010965dc
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
src/transformers/models/prophetnet/modeling_prophetnet.py
src/transformers/models/prophetnet/modeling_prophetnet.py
+1
-1
No files found.
src/transformers/models/prophetnet/modeling_prophetnet.py
View file @
07c2607d
...
...
@@ -1812,7 +1812,7 @@ class ProphetNetModel(ProphetNetPreTrainedModel):
>>> last_hidden_states = outputs.last_hidden_state # main stream hidden states
>>> last_hidden_states_ngram = outputs.last_hidden_state_ngram # predict hidden states
"""
use_cache
=
=
use_cache
if
use_cache
is
not
None
else
self
.
config
.
use_cache
use_cache
=
use_cache
if
use_cache
is
not
None
else
self
.
config
.
use_cache
output_attentions
=
output_attentions
if
output_attentions
is
not
None
else
self
.
config
.
output_attentions
output_hidden_states
=
(
output_hidden_states
if
output_hidden_states
is
not
None
else
self
.
config
.
output_hidden_states
...
...
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