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
35d32308
Commit
35d32308
authored
Dec 24, 2019
by
thomwolf
Browse files
adding back final dropout in T5
parent
e74c73a8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
0 deletions
+1
-0
src/transformers/modeling_t5.py
src/transformers/modeling_t5.py
+1
-0
No files found.
src/transformers/modeling_t5.py
View file @
35d32308
...
@@ -629,6 +629,7 @@ class T5Stack(T5PreTrainedModel):
...
@@ -629,6 +629,7 @@ class T5Stack(T5PreTrainedModel):
all_attentions
=
all_attentions
+
(
layer_outputs
[
1
],)
# We keep only self-attention weights for now
all_attentions
=
all_attentions
+
(
layer_outputs
[
1
],)
# We keep only self-attention weights for now
hidden_states
=
self
.
final_layer_norm
(
hidden_states
)
hidden_states
=
self
.
final_layer_norm
(
hidden_states
)
hidden_states
=
self
.
dropout
(
hidden_states
)
# Add last layer
# Add last layer
if
self
.
output_hidden_states
:
if
self
.
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