doevent's picture
Upload 14 files
5004324 verified
raw
history blame contribute delete
203 Bytes
def freeze(model):
for p in model.parameters():
p.requires_grad = False
return model
def unfreeze(model):
for p in model.parameters():
p.requires_grad = True
return model