Update structure_mapping.py

This commit is contained in:
William 2022-07-29 15:48:16 +08:00 committed by GitHub
parent c056213b97
commit fd57f823fe
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -251,7 +251,7 @@ def mapping_for_SequenceClassification(mapping, type):
"out_proj": {"__name__":"out_proj"}
}
elif type == "bert":
mapping.pop("lm_head")
mapping.pop("cls.predictions")
mapping["classifier"] = {"__name__": "classifier"}
elif type == "deberta":
mapping.pop("lm_predictions.lm_head")
@ -346,4 +346,4 @@ if __name__ == "__main__":
for name, _ in plm.named_modules():
transform(name, t5_mapping, strict=True, warning=False)