From the docs:
requires_grad – Boolean indicating whether the Variable has been created by a subgraph containing any Variable, that requires it. Can be changed only on leaf Variables
- What does it mean by leaf nodes here? Are leaf nodes only the input nodes?
- If it can be only changed at the leaf nodes, how can I freeze layers then?