Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save n0obcoder/31a23a8cd2db69148f8a938607684cd3 to your computer and use it in GitHub Desktop.

Select an option

Save n0obcoder/31a23a8cd2db69148f8a938607684cd3 to your computer and use it in GitHub Desktop.
for name, param in model_new.named_parameters():
print(name, ':', param.requires_grad)
sequential.0.weight : False
sequential.0.bias : False
sequential.1.weight : False
sequential.1.bias : False
layer1.weight : False
layer1.bias : False
layer2.weight : False
layer2.bias : False
fc.weight : True
fc.bias : True
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment