From 4ab989e0157cc8dc48c811078b50ec96509831a9 Mon Sep 17 00:00:00 2001 From: James Betker Date: Tue, 22 Sep 2020 18:27:52 -0600 Subject: [PATCH] try again.. --- codes/models/steps/losses.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/codes/models/steps/losses.py b/codes/models/steps/losses.py index b2910ca7..259f91ee 100644 --- a/codes/models/steps/losses.py +++ b/codes/models/steps/losses.py @@ -82,7 +82,7 @@ class FeatureLoss(ConfigurableLoss): logits_real = self.netF(state[self.opt['real']]) logits_fake = self.netF(state[self.opt['fake']]) if self.opt['criterion'] == 'cosine': - return self.criterion(logits_fake, logits_real, torch.ones_like(1, device=logits_fake.device)) + return self.criterion(logits_fake, logits_real, torch.ones(1, device=logits_fake.device)) else: return self.criterion(logits_fake, logits_real)