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
39c38b2e
"test/vscode:/vscode.git/clone" did not exist on "2772751df7e9417d7b3cfe739d2e1e08602cf3bf"
Commit
39c38b2e
authored
Sep 12, 2019
by
thomwolf
Browse files
fix
parent
dcddf498
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
0 deletions
+3
-0
pytorch_transformers/modeling_tf_pytorch_utils.py
pytorch_transformers/modeling_tf_pytorch_utils.py
+3
-0
No files found.
pytorch_transformers/modeling_tf_pytorch_utils.py
View file @
39c38b2e
...
...
@@ -63,6 +63,9 @@ def load_pytorch_state_dict_in_tf2_model(tf_model, pt_state_dict, tf_inputs=None
raise
e
# Adapt state dict - TODO remove this and update the AWS weights files instead
# Convert old format to new format if needed from a PyTorch state_dict
old_keys
=
[]
new_keys
=
[]
for
key
in
pt_state_dict
.
keys
():
new_key
=
None
if
'gamma'
in
key
:
...
...
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