Update structure_mapping.py
This commit is contained in:
parent
c056213b97
commit
fd57f823fe
|
@ -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)
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue