Commit 573b7484 authored by Atreya Majumdar's avatar Atreya Majumdar
Browse files

Changed maximum back to torch

parent c56ce570
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -113,8 +113,8 @@ class SquaredHingeLoss(Loss):
      output, labels = _make_pytorch_shapes_consistent(output, labels)
      return torch.mean(
          torch.pow(
              np.maximum(1 - torch.multiply(labels, output), torch.tensor(0)),
              2),
              torch.maximum(1 - torch.multiply(labels, output),
                            torch.tensor(0)), 2),
          dim=-1)

    return loss