For unreduced losses you would need to provide the gradient 27:
loss_fn = nn.MSELoss(reduce=False)
loss = loss_fn(torch.randn(10, 10, requires_grad=True), torch.randn(10, 10))
loss.backward(torch.ones_like(loss))