0

I try to follow this nice MXNet Tutorial. I create an extremely simple neural network (two input unit, no hidden units and one output unit) doing this:

from mxnet import gluon

net = gluon.nn.Dense(1, in_units=2)

After that I try to take a look at the shape of the weight matrix (the same way as it is described in the tutorial):

print(net.weight)

As a result I expect to see this:

Parameter dense4_weight (shape=(1, 2), dtype=None)

However, I see the following error message:

Traceback (most recent call last):
  File "tmp.py", line 5, in <module>
    print(net.weight)
  File "/usr/local/lib/python3.6/site-packages/mxnet/gluon/parameter.py", line 120, in __repr__
    return s.format(**self.__dict__)
KeyError: 'shape'

Am I doing something wrong?

José Pereda
  • 44,311
  • 7
  • 104
  • 132
Roman
  • 124,451
  • 167
  • 349
  • 456

1 Answers1

2

This is a regression that happened here and has since been fixed on master branch here. Expect it to be fixed in the next MXNet release.

Sina Afrooze
  • 960
  • 6
  • 11