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

VAE_example.ipynb runs into an error #12036

@shirishr

Description

@shirishr

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:

  1. Java version: (java -version)
  2. Maven version: (mvn -version)
  3. 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?

  1. I am not experienced enough with mxnet...so not sure why this error happens

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions