From 038b8654b643639e17a22ad4afd6e4da313b4d26 Mon Sep 17 00:00:00 2001 From: James Betker Date: Wed, 13 Jan 2021 11:54:25 -0700 Subject: [PATCH] Pixpro: unwrap losses --- .../pixel_level_contrastive_learning/pixpro_lucidrains.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/codes/models/pixel_level_contrastive_learning/pixpro_lucidrains.py b/codes/models/pixel_level_contrastive_learning/pixpro_lucidrains.py index a40be66c..73a0a973 100644 --- a/codes/models/pixel_level_contrastive_learning/pixpro_lucidrains.py +++ b/codes/models/pixel_level_contrastive_learning/pixpro_lucidrains.py @@ -489,9 +489,7 @@ class PixelCL(nn.Module): pix_loss = (loss_pixpro_one_two + loss_pixpro_two_one) / 2 - # total loss - loss = pix_loss * self.alpha + instance_loss - return loss, positive_pixel_pairs + return instance_loss, pix_loss, positive_pixel_pairs # Allows visualizing what the augmentor is up to. def visual_dbg(self, step, path):