From 0011d445c8cb80af509899f43b3080923bda120a Mon Sep 17 00:00:00 2001 From: James Betker Date: Fri, 9 Oct 2020 20:20:51 -0600 Subject: [PATCH] Fix loss indexing --- 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 9543ed8f..e2f60783 100644 --- a/codes/models/steps/losses.py +++ b/codes/models/steps/losses.py @@ -413,5 +413,5 @@ class ForElementLoss(ConfigurableLoss): def forward(self, net, state): st = state.copy() st['_real'] = state[self.opt['real']][:, self.index] - st['_fake'] = state[self.opt['fake']][:, self.index] + st['_fake'] = state[self.opt['fake']][self.index] return self.loss(net, st)