Autograd will take your loss into consideration when you call .backward() on the output of the loss. Yes, this is similar to multiplying your final loss by, say, 2 and then calling .backward() on it. Why would you not want this to be the case?
The easiest way to verify this is to pass in some random values (or ones, or zeros) to your loss function, do a .backward(), and check the gradients of your inputs:
inputs = Variable(torch.ones(n, 3, 3), requires_grad=True)
targets = Variable(torch.ones(n, 3, 3))
loss(inputs, targets).backward()

I don’t think max and min are differentiable, though.