Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

Two fixes for info_gan.md example Code #15323

Merged
merged 2 commits into from
Jul 10, 2019
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion docs/tutorials/gluon/info_gan.md
Original file line number Diff line number Diff line change
Expand Up @@ -339,9 +339,11 @@ with SummaryWriter(logdir='./logs/') as sw:
fake_image = generator(g_input)

sw.add_scalar(tag='Loss_D', value={'test':d_error_epoch.asscalar()/count}, global_step=counter)
sw.add_scalar(tag='Loss_G', value={'test':d_error_epoch.asscalar()/count}, global_step=counter)
sw.add_scalar(tag='Loss_G', value={'test':g_error_epoch.asscalar()/count}, global_step=counter)
sw.add_image(tag='data_image', image=((fake_image[0]+ 1.0) * 127.5).astype(np.uint8) , global_step=counter)
sw.flush()

counter += 1

discriminator.save_parameters("infogan_d_latest.params")
generator.save_parameters("infogan_g_latest.params")
Expand Down