Thanks Juan,



 JuanFMontesinos:

My guess is that it is not checking if the graph is broken or not


If that’s the case then that’s a silent error which should be looked upon from pytorch folks cause it can cause wrongful computations to go unnoticed.



 JuanFMontesinos:

You are hard assigning some values of the tensor as 0, that’s not backproagable


Awesome, that’s where that aha moment strikes you in your face.
I guess, I’ll have to come up with a differentiable approach to do the equivalent of assigning those values.