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
f0c00d8c
"...git@developer.sourcefind.cn:wangsen/paddle_dbnet.git" did not exist on "703bb1a97c6fdf00976462429e5775f1b1efc7d1"
Unverified
Commit
f0c00d8c
authored
Mar 21, 2022
by
Suraj Patil
Committed by
GitHub
Mar 21, 2022
Browse files
Fix Marian conversion script (#16300)
parent
94be4243
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletion
+2
-1
src/transformers/models/marian/convert_marian_to_pytorch.py
src/transformers/models/marian/convert_marian_to_pytorch.py
+2
-1
No files found.
src/transformers/models/marian/convert_marian_to_pytorch.py
View file @
f0c00d8c
...
...
@@ -482,6 +482,7 @@ class OpusState:
self
.
state_dict
=
dict
(
self
.
state_dict
)
if
cfg
[
"tied-embeddings-all"
]:
cfg
[
"tied-embeddings-src"
]
=
True
cfg
[
"tied-embeddings"
]
=
True
self
.
share_encoder_decoder_embeddings
=
cfg
[
"tied-embeddings-src"
]
# create the tokenizer here because we need to know the eos_token_id
...
...
@@ -536,7 +537,7 @@ class OpusState:
decoder_ffn_dim
=
cfg
[
"transformer-dim-ffn"
],
encoder_ffn_dim
=
cfg
[
"transformer-dim-ffn"
],
d_model
=
cfg
[
"dim-emb"
],
activation_function
=
cfg
[
"transformer-
aa
n-activation"
],
activation_function
=
cfg
[
"transformer-
ff
n-activation"
],
pad_token_id
=
self
.
pad_token_id
,
eos_token_id
=
eos_token_id
,
forced_eos_token_id
=
eos_token_id
,
...
...
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