Commit d23eed85 authored by thomwolf's avatar thomwolf
Browse files

model loading apex modification

parents 1cbb32a5 1df6f262
...@@ -523,7 +523,7 @@ class PreTrainedBertModel(nn.Module): ...@@ -523,7 +523,7 @@ class PreTrainedBertModel(nn.Module):
old_keys.append(key) old_keys.append(key)
new_keys.append(new_key) new_keys.append(new_key)
for old_key, new_key in zip(old_keys, new_keys): for old_key, new_key in zip(old_keys, new_keys):
state_dict[new_key]=state_dict.pop(old_key) state_dict[new_key] = state_dict.pop(old_key)
missing_keys = [] missing_keys = []
unexpected_keys = [] unexpected_keys = []
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment