# freeze all layers... but you get the point for param in model.parameters(): param.requires_grad = False