Skip to content

Commit ff97df4

Browse files
committed
consistent space
1 parent e0fbac6 commit ff97df4

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

src/utils/losses.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,6 @@ def forward(self, zis, zjs, temperature):
291291

292292
labels = torch.zeros(2 * self.batch_size).to(self.device).long()
293293
loss = self.criterion(logits, labels)
294-
295294
return loss / (2 * self.batch_size)
296295

297296

@@ -373,5 +372,4 @@ def calc_derv(inputs, labels, netD, conditional_strategy, device, netG=None):
373372
create_graph=True, retain_graph=True, only_inputs=True)[0]
374373

375374
gradients_norm = torch.unsqueeze((gradients.norm(2, dim=1) ** 2), dim=1)
376-
377375
return gradients, gradients_norm

0 commit comments

Comments
 (0)