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
ca7912d1
Unverified
Commit
ca7912d1
authored
Oct 05, 2023
by
Soyoung Yoon
Committed by
GitHub
Oct 04, 2023
Browse files
Fix encoder->decoder typo bug in convert_t5x_checkpoint_to_pytorch.py (#26587)
Fix bug in convert_t5x_checkpoint_to_pytorch.py
parent
8b03615b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
src/transformers/models/t5/convert_t5x_checkpoint_to_pytorch.py
...ansformers/models/t5/convert_t5x_checkpoint_to_pytorch.py
+1
-1
No files found.
src/transformers/models/t5/convert_t5x_checkpoint_to_pytorch.py
View file @
ca7912d1
...
@@ -139,7 +139,7 @@ def convert_t5x_to_pytorch(variables: dict, *, num_layers: int, is_encoder_only:
...
@@ -139,7 +139,7 @@ def convert_t5x_to_pytorch(variables: dict, *, num_layers: int, is_encoder_only:
new
[
f
"decoder.block.
{
i
}
.layer.2.DenseReluDense.wi_0.weight"
]
=
wi
[
0
].
T
new
[
f
"decoder.block.
{
i
}
.layer.2.DenseReluDense.wi_0.weight"
]
=
wi
[
0
].
T
new
[
f
"decoder.block.
{
i
}
.layer.2.DenseReluDense.wi_1.weight"
]
=
wi
[
1
].
T
new
[
f
"decoder.block.
{
i
}
.layer.2.DenseReluDense.wi_1.weight"
]
=
wi
[
1
].
T
else
:
else
:
new
[
f
"e
n
coder.block.
{
i
}
.layer.2.DenseReluDense.wi.weight"
]
=
wi
.
T
new
[
f
"
d
ecoder.block.
{
i
}
.layer.2.DenseReluDense.wi.weight"
]
=
wi
.
T
new
[
f
"decoder.block.
{
i
}
.layer.2.DenseReluDense.wo.weight"
]
=
wo
.
T
new
[
f
"decoder.block.
{
i
}
.layer.2.DenseReluDense.wo.weight"
]
=
wo
.
T
new
[
"decoder.final_layer_norm.weight"
]
=
old
[
"decoder/decoder_norm/scale"
]
new
[
"decoder.final_layer_norm.weight"
]
=
old
[
"decoder/decoder_norm/scale"
]
...
...
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