固定backbone模型参数,留个底
if cfg.fewshot_training:
for key, value in model.named_parameters():
if ‘backbone’ in key:
value.requires_grad = False
固定模型参数
最新推荐文章于 2023-05-18 11:58:28 发布
固定backbone模型参数,留个底
if cfg.fewshot_training:
for key, value in model.named_parameters():
if ‘backbone’ in key:
value.requires_grad = False