Could you check the shape of y_pred before using torch.squeeze as well as the shape of y_train?
Since you are using nn.MSELoss both tensors should have the same shape as otherwise a broadcasting would be applied internally and will raise a warning in newer PyTorch versions.