@Varal7 thanks, I get that part conceptually now, but this does bring two questions to my mind.
The first is: if I use .clone() to remedy this issue, does this invalidate the backpropagation?
Secondly (and this one is more of a longshot), do you have any idea why this would be the case in my code? I am essentially populating y_pred[:, i] (which is a vector) one element at a time using the loop in j. From what I can see I don’t touch this vector after it is populated, so I can’t see why it is being modified after loop in i iterates?
Many thanks,
Jase