From 0ae84144817a821f74ce50bfc7844742a26d913f Mon Sep 17 00:00:00 2001 From: "Michael Pilosov, PhD" Date: Sun, 28 Jan 2024 09:54:38 +0000 Subject: [PATCH] syntax, no diff --- losses.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/losses.py b/losses.py index 6a6ca46..edc1f94 100644 --- a/losses.py +++ b/losses.py @@ -51,9 +51,9 @@ def preservation_loss(inputs, outputs, target_inputs=None, target_outputs=None): def circle_norm(vector, other_vector): # Assumes vectors are of shape (N,1) - diff = vector - other_vector.T - loss_a = torch.triu(torch.abs(diff)) - loss_b = torch.triu(torch.abs(1 - torch.abs(diff))) + diff = torch.abs(vector - other_vector.T) + loss_a = torch.triu(diff) + loss_b = torch.triu(torch.abs(1 - diff)) loss = torch.minimum(loss_a, loss_b) return loss