You would have to check if the manipulated tensor is needed in its original form for the gradient calculation, which disallows inplace operations on it.
This post shows you a simple example.
1 Like
You would have to check if the manipulated tensor is needed in its original form for the gradient calculation, which disallows inplace operations on it.
This post shows you a simple example.