Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
chenpangpang
transformers
Commits
50f4539b
Unverified
Commit
50f4539b
authored
Apr 23, 2021
by
Patrick von Platen
Committed by
GitHub
Apr 23, 2021
Browse files
push (#11400)
parent
bf2e0cf7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletion
+2
-1
src/transformers/models/wav2vec2/convert_wav2vec2_original_pytorch_checkpoint_to_pytorch.py
...onvert_wav2vec2_original_pytorch_checkpoint_to_pytorch.py
+2
-1
No files found.
src/transformers/models/wav2vec2/convert_wav2vec2_original_pytorch_checkpoint_to_pytorch.py
View file @
50f4539b
...
...
@@ -66,7 +66,8 @@ def set_recursively(hf_pointer, key, value, full_name, weight_type):
assert
(
hf_shape
==
value
.
shape
),
f
"Shape of hf
{
key
+
'.'
+
weight_type
}
is
{
hf_shape
}
, but should be
{
value
.
shape
}
for
{
full_name
}
"
),
f
"Shape of hf
{
key
+
'.'
+
weight_type
if
weight_type
is
not
None
else
''
}
is
{
hf_shape
}
, but should be
{
value
.
shape
}
for
{
full_name
}
"
if
weight_type
==
"weight"
:
hf_pointer
.
weight
.
data
=
value
elif
weight_type
==
"weight_g"
:
...
...
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