Skip to content

Commit

Permalink
returns the value of the tensors as a standard Python number
Browse files Browse the repository at this point in the history
I assume that we are interested in the standard Python number, and not the Tensor value.
  • Loading branch information
tejuafonja authored Oct 13, 2023
1 parent 16b10cf commit 02459b1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ctgan/synthesizers/ctgan.py
Original file line number Diff line number Diff line change
Expand Up @@ -422,8 +422,8 @@ def fit(self, train_data, discrete_columns=(), epochs=None):
loss_g.backward()
optimizerG.step()

generator_loss = loss_g.detach().cpu()
discriminator_loss = loss_d.detach().cpu()
generator_loss = loss_g.detach().cpu().item()
discriminator_loss = loss_d.detach().cpu().item()

epoch_loss_df = pd.DataFrame({
'Epoch': [i],
Expand Down

0 comments on commit 02459b1

Please sign in to comment.