When you do x = coordinates[:, 0, :, :], then x actually shares the content of the coordinates tensor.
But then you try to do x[x < 0] = 0 which tries to change x in-place. But since it shares it’s tensor with coordinates (and y), you are not allowed to do that because you may loose some informations needed to do the backpropagation.