when I run python3 wgan.py, appears print ("[Epoch %d/%d] [Batch %d/%d] [D loss: %f] [G loss: %f]" % (epoch, opt.n_epochs,batches_done % len(dataloader), len(dataloader),d_loss.item(), gen_validity.item()))
ValueError: only one element tensors can be converted to Python scalars
how can i fix it?
when I run python3 wgan.py, appears print ("[Epoch %d/%d] [Batch %d/%d] [D loss: %f] [G loss: %f]" % (epoch, opt.n_epochs,batches_done % len(dataloader), len(dataloader),d_loss.item(), gen_validity.item())) ValueError: only one element tensors can be converted to Python scalars how can i fix it?