requires_grad relation to leaf nodes

Viewed 7067

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

  1. What does it mean by leaf nodes here? Are leaf nodes only the input nodes?
  2. If it can be only changed at the leaf nodes, how can I freeze layers then?
1 Answers
Related