Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

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

Select an option

Save n0obcoder/ac9e3b97226669d139ef0614102f3c86 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 : True
sequential.0.bias : True
sequential.1.weight : True
sequential.1.bias : True
layer1.weight : True
layer1.bias : True
layer2.weight : True
layer2.bias : True
fc.weight : True
fc.bias : True
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment