albanD:

is_leaf


from my understanding a leaf is a tensor witch don’t require gradiant.
so not requires_grad == is_leaf is always true
But I really not understand what is really a leaf.
to compute the gradiant you generate a tree? what are the node in the tree witch are not leaf?