Hi AlbanD. What I am trying to do is make sure that the gradient information w.grad is treated as a number if the computation graph and not as a variable that one can differentiate. i.e. treated as a constant. Does that make sense?
Would .data still make things go wrong? In what way? I tried some code and printed values and the differentiation worked as I would have expected so I am not sure what you are suggesting or how it fixes my scenario.