You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by GitBox <gi...@apache.org> on 2018/11/27 11:03:20 UTC

[GitHub] marcoabreu closed pull request #13416: Fix infoGan Gluon tutorial errors (fix NightlyTestsForBinaries breakage)

marcoabreu closed pull request #13416: Fix infoGan Gluon tutorial errors (fix NightlyTestsForBinaries breakage)
URL: https://github.com/apache/incubator-mxnet/pull/13416
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/ci/docker/install/ubuntu_tutorials.sh b/ci/docker/install/ubuntu_tutorials.sh
index 98774754e9b..404d4bbf646 100755
--- a/ci/docker/install/ubuntu_tutorials.sh
+++ b/ci/docker/install/ubuntu_tutorials.sh
@@ -23,5 +23,5 @@
 set -ex
 apt-get update || true
 apt-get install graphviz python-opencv
-pip2 install jupyter matplotlib Pillow opencv-python scikit-learn graphviz tqdm
-pip3 install jupyter matplotlib Pillow opencv-python scikit-learn graphviz tqdm
+pip2 install jupyter matplotlib Pillow opencv-python scikit-learn graphviz tqdm mxboard
+pip3 install jupyter matplotlib Pillow opencv-python scikit-learn graphviz tqdm mxboard
diff --git a/docs/tutorials/gluon/info_gan.md b/docs/tutorials/gluon/info_gan.md
index c8f07c6fda3..8b2668ab22e 100644
--- a/docs/tutorials/gluon/info_gan.md
+++ b/docs/tutorials/gluon/info_gan.md
@@ -311,18 +311,18 @@ with SummaryWriter(logdir='./logs/') as sw:
 
             # logging
             if idx % 10 == 0:
-           
+                count = idx + 1
                 logging.info('speed: {} samples/s'.format(batch_size / (time.time() - starttime)))
                 logging.info('discriminator loss = %f, generator loss = %f at iter %d epoch %d'
-                         %(d_error_epoch.asscalar()/idx,g_error_epoch.asscalar()/idx, idx, epoch))
+                         %(d_error_epoch.asscalar()/count,g_error_epoch.asscalar()/count, count, epoch))
 
                 g_input,_,_ = create_generator_input()
                 
                 # create some fake image for logging in MXBoard
                 fake_image = generator(g_input)
 
-                sw.add_scalar(tag='Loss_D', value={'test':d_error_epoch.asscalar()/idx}, global_step=counter)
-                sw.add_scalar(tag='Loss_G', value={'test':d_error_epoch.asscalar()/idx}, global_step=counter)
+                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_image(tag='data_image', image=((fake_image[0]+ 1.0) * 127.5).astype(np.uint8)  , global_step=counter)
                 sw.flush()
         


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services