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
92cfe8b0
Unverified
Commit
92cfe8b0
authored
Nov 15, 2022
by
Arthur
Committed by
GitHub
Nov 15, 2022
Browse files
Remove `authorized_missing_keys`in favor of _keys_to_ignore_on_load_missing (#20228)
parent
2d920010
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
src/transformers/models/convbert/modeling_convbert.py
src/transformers/models/convbert/modeling_convbert.py
+2
-2
No files found.
src/transformers/models/convbert/modeling_convbert.py
View file @
92cfe8b0
...
@@ -246,8 +246,8 @@ class ConvBertPreTrainedModel(PreTrainedModel):
...
@@ -246,8 +246,8 @@ class ConvBertPreTrainedModel(PreTrainedModel):
load_tf_weights
=
load_tf_weights_in_convbert
load_tf_weights
=
load_tf_weights_in_convbert
base_model_prefix
=
"convbert"
base_model_prefix
=
"convbert"
supports_gradient_checkpointing
=
True
supports_gradient_checkpointing
=
True
authorize
d_missing
_keys
=
[
r
"position_ids"
]
_keys_to_ignore_on_loa
d_missing
=
[
r
"position_ids"
]
authorize
d_unexpected
_keys
=
[
r
"convbert.embeddings_project.weight"
,
r
"convbert.embeddings_project.bias"
]
_keys_to_ignore_on_loa
d_unexpected
=
[
r
"convbert.embeddings_project.weight"
,
r
"convbert.embeddings_project.bias"
]
def
_init_weights
(
self
,
module
):
def
_init_weights
(
self
,
module
):
"""Initialize the weights"""
"""Initialize the weights"""
...
...
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