altosaar opened a new issue #10508: MXNet much slower than TensorFlow
   I might be doing this comparison wrong - please let me know! Most likely I 
have written a bug that causes the slowdown.
   I implemented a variational autoencoder in MXNet using the Gluon library, 
and hybridized it. Here is the code:
   I also implemented it in TensorFlow:
   However, it is orders of magnitude slower in MXNet than in TensorFlow. I 
made sure to match the hyperparameters and checked that I get the same results 
in both frameworks, so I don't think there is a bug in terms of the math (both 
implementations get to a training ELBO of around -100 on the binary MNIST 
dataset in a few thousand iterations). 
   I'm using MXNet 1.1.0 with a P100 GPU, and TensorFlow 1.6.0. 
   Here is the timing information:
   With GPU:
   $ python
   Iter 1000       ELBO: -144.5    speed: 3.567e-03 s/iter
   Iter 2000       ELBO: -118.3    speed: 3.686e-03 s/iter
   Without GPU:
   $ python
   Iter 1000       ELBO: -143.0    speed: 1.171e-02 s/iter
   Iter 2000       ELBO: -121.2    speed: 1.192e-02 s/iter
   On CPU: 
   $ python
   Iteration: 1000 ELBO: -137.405 sec/iter: 1.878e-06
   Iteration: 2000 ELBO: -125.329 sec/iter: 1.929e-06

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:

With regards,
Apache Git Services

Reply via email to