-
Notifications
You must be signed in to change notification settings - Fork 6.7k
VAE_example.ipynb runs into an error #12036
Description
Note: Providing complete information in the most concise form is the best way to get help. This issue template serves as the checklist for essential information to most of the technical issues and bug reports. For non-technical issues and feature requests, feel free to present the information in what you believe is the best form.
For Q & A and discussion, please start a discussion thread at https://discuss.mxnet.io
Description
incubator-mxnet/example/vae/VAE_example.ipynb errors out with TypeError: type <class 'numpy.ndarray'> not supported
Environment info (Required)
python Version 3.6
mxnet Version: 1.3.0
What to do:
1. Download the diagnosis script from https://raw.githubusercontent.com/apache/incubator-mxnet/master/tools/diagnose.py
2. Run the script using `python diagnose.py` and paste its output here.
Package used (Python/R/Scala/Julia):
(I'm using Python)
For Scala user, please provide:
- Java version: (
java -version) - Maven version: (
mvn -version) - Scala runtime if applicable: (
scala -version)
For R user, please provide R sessionInfo():
Build info (Required if built from source)
Compiler (gcc/clang/mingw/visual studio):
MXNet commit hash:
(Paste the output of git rev-parse HEAD here.)
Build config:
(Paste the content of config.mk, or the build command.)
Error Message:
Error starts at:
z = mu + np.multiply(mx.symbol.exp(0.5 * logvar),
mx.symbol.random_normal(loc=0, scale=1, shape=np.shape(logvar.get_internals()["logvar_output"])))
TypeError Traceback (most recent call last)
in ()
13 ## sample the latent variables z according to Normal(mu,var)
14 z = mu + np.multiply(mx.symbol.exp(0.5 * logvar),
---> 15 mx.symbol.random_normal(loc=0, scale=1, shape=np.shape(logvar.get_internals()["logvar_output"])))
~/incubator-mxnet/python/mxnet/symbol/symbol.py in add(self, other)
103 return _internal._PlusScalar(self, scalar=other)
104 else:
--> 105 raise TypeError('type %s not supported' % str(type(other)))
106
107 def bool(self):
TypeError: type <class 'numpy.ndarray'> not supported
Minimum reproducible example
(If you are using your own code, please provide a short script that reproduces the error. Otherwise, please provide link to the existing example.)
Steps to reproduce
(Paste the commands you ran that produced the error.)
What have you tried to solve it?
- I am not experienced enough with mxnet...so not sure why this error happens