赞
踩
# 冻结 BERT 模型的参数for name, param in self.bert.named_parameters(): if not name.startswith("bert.encoder.layer.11"): param.requires_grad = False