I noticed recently that sourceTensor.clone() is not a leaf variable and is part of the original computational graph and I wondered why this could be useful?
I noticed recently that sourceTensor.clone() is not a leaf variable and is part of the original computational graph and I wondered why this could be useful?
To allow in-place operations for example.
This for instance. Instead of adding 0.
, one can use *.clone()
as in here.
Okay, thank you!
Best regards,
Stefan