Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
fealho committed Jul 29, 2024
1 parent 118f3b6 commit 3ad1f48
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ctgan/synthesizers/ctgan.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def calc_gradient_penalty(self, real_data, fake_data, device='cpu', pac=10, lamb
interpolates = alpha * real_data + ((1 - alpha) * fake_data)

disc_interpolates = self(interpolates)
self.set_device(device)
torch.cuda.set_device(0)
gradients = torch.autograd.grad(
outputs=disc_interpolates,
inputs=interpolates,
Expand Down

0 comments on commit 3ad1f48

Please sign in to comment.