Hi

I am trying to implement a regression loss function where I have multiple outputs but I want the loss function to be something like sum(Y_prediction-Y_target)/max(Y_target),

so far I have:

def my_loss(output, target):

```
maxes = torch.max(target, dim = 1)
diff = (output - target)
diff_sums = torch.sum(diff,dim = 1)
loss = torch.div(diff_sums,maxes)
return loss
```

but I am getting error:

div(): argument ‘other’ (position 2) must be Tensor, not torch.return_types.max