You are correct. I acutally need the loss inside my model, since it seems like I cannot compute the gradient after nn.MSELoss.
The result is similar, so I think the warning is specifically due to my achitecture.