Unverified Commit e7717497 authored by Julien Plu's avatar Julien Plu Committed by GitHub
Browse files

Fix add order (#9129)

parent 18ecd36f
......@@ -623,9 +623,9 @@ class TFTransfoXLMainLayer(tf.keras.layers.Layer):
core_out = tf.transpose(core_out, perm=(1, 0, 2))
if inputs["output_hidden_states"]:
# Add last layer and transpose to library standard shape [bsz, len, hidden_dim]
hids.append(core_out)
# Transpose to library standard shape [bsz, len, hidden_dim] and add last layer
hids = tuple(tf.transpose(t, perm=(1, 0, 2)) for t in hids)
hids = hids + (core_out,)
else:
hids = None
if inputs["output_attentions"]:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment