Skip to content

Commit

Permalink
Use new item() method after upgrade to pytorch 0.4.0
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnVinyard committed Jun 25, 2018
1 parent 478ddc3 commit 55d18ef
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions zounds/learn/wgan.py
Original file line number Diff line number Diff line change
Expand Up @@ -230,9 +230,9 @@ def train(self, data):
g_loss.backward()
self.generator_optim.step()

gl = g_loss.data[0]
dl = d_loss.data[0]
rl = real_mean.data[0]
gl = g_loss.data.item()
dl = d_loss.data.item()
rl = real_mean.data.item()

self.on_batch_complete(
epoch=epoch,
Expand Down

0 comments on commit 55d18ef

Please sign in to comment.