MxNet backend for PyMC4

Should we use MxNet instead of Theano? What are the pros and cons?

Some discussion with the MxNet devs can be found here: https://discuss.mxnet.io/t/moving-pymc3-from-theano-to-mxnet/86

Some remark of MXNet (Backed by Apache and Amazon):

  • Pro
    • Static and dynamic graphs. Does optimisations for static graphs using nnvm.
    • Custom ops in python (similar to theano). C++ ops should be reasonably straight forward as well. Good control over memory locations of variables.
    • Good support for automatic parallelisation.
  • Con

I highly recommend to not limit yourself to dynamic graph and PyTorch. Having both static and dynamic options and use them wisely. So MXNet and TF are the options and MXNet wins in my opinion, by being completely open source and very hackable!

Also not to mention the Pyro by Uber could be another reason to not go for PyTorch and since Edward exists if PyMC4 can be on MXNet it’d be a great win.

1 Like