The x.numpy() operation will break the computation graph, so you should use the plain PyTorch approach.
If you need gradients for the input, I would also recommend to not normalize it inplace, but create a new normalized tensor.