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
e7717497
Unverified
Commit
e7717497
authored
Dec 15, 2020
by
Julien Plu
Committed by
GitHub
Dec 15, 2020
Browse files
Fix add order (#9129)
parent
18ecd36f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
src/transformers/models/transfo_xl/modeling_tf_transfo_xl.py
src/transformers/models/transfo_xl/modeling_tf_transfo_xl.py
+2
-2
No files found.
src/transformers/models/transfo_xl/modeling_tf_transfo_xl.py
View file @
e7717497
...
@@ -623,9 +623,9 @@ class TFTransfoXLMainLayer(tf.keras.layers.Layer):
...
@@ -623,9 +623,9 @@ class TFTransfoXLMainLayer(tf.keras.layers.Layer):
core_out
=
tf
.
transpose
(
core_out
,
perm
=
(
1
,
0
,
2
))
core_out
=
tf
.
transpose
(
core_out
,
perm
=
(
1
,
0
,
2
))
if
inputs
[
"output_hidden_states"
]:
if
inputs
[
"output_hidden_states"
]:
# Add last layer and transpose to library standard shape [bsz, len, hidden_dim]
# Transpose to library standard shape [bsz, len, hidden_dim] and add last layer
hids
.
append
(
core_out
)
hids
=
tuple
(
tf
.
transpose
(
t
,
perm
=
(
1
,
0
,
2
))
for
t
in
hids
)
hids
=
tuple
(
tf
.
transpose
(
t
,
perm
=
(
1
,
0
,
2
))
for
t
in
hids
)
hids
=
hids
+
(
core_out
,)
else
:
else
:
hids
=
None
hids
=
None
if
inputs
[
"output_attentions"
]:
if
inputs
[
"output_attentions"
]:
...
...
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