rbm icon indicating copy to clipboard operation
rbm copied to clipboard

AttributeError: 'module' object has no attribute 'figure'

Open yohanesgultom opened this issue 9 years ago • 3 comments

Hi Leif Johnson,

I tried to run the test by following the instruction in https://pypi.python.org/pypi/lmj.rbm/0.1 in Ubuntu 15.10 (with Geforce 940m). I have resolved all the dependency issues but ended up with this error below. I hope you don't mind to check it out for me as I'm relatively new to python. Thanks.

python test/mnist.py -i "../mnist/*-images-idx3-ubyte" -l "../mnist/*-labels-idx3-ubyte"
Traceback (most recent call last):
  File "test/mnist.py", line 76, in <module>
    fig = glumpy.figure()
AttributeError: 'module' object has no attribute 'figure'

yohanesgultom avatar Nov 08 '15 13:11 yohanesgultom

@yohanesgultom I was having the same issue. The problem is because glumpy changed its API. Installing version 0.2.1 resolved this issue.

sudo pip install glumpy==0.2.1

vaibhaw avatar Nov 21 '15 11:11 vaibhaw

@vaibhawchandel thanks. it does solve the previous problem. But unfortunately triggers a new one:

Traceback (most recent call last):
  File "_ctypes/callbacks.c", line 314, in 'calling callback function'
  File "/usr/local/lib/python2.7/dist-packages/glumpy/window/backend_glut.py", line 246, in _idle
    self.dispatch_event('on_idle', dt)
  File "/usr/local/lib/python2.7/dist-packages/glumpy/window/event.py", line 349, in dispatch_event
    if handler(*args):
  File "test/mnist.py", line 184, in on_idle
    update(*learn())
  File "test/mnist.py", line 142, in learn
    pixels = get_pixels()
  File "test/mnist.py", line 112, in get_pixels
    t, pixels = loader.next()
StopIteration
...

This error is shown repeatedly until I close the plotting window. Do you have any clue?

yohanesgultom avatar Nov 24 '15 13:11 yohanesgultom

@yohanesgultom It seems it is unable to read/load mnist data. You should try to debug test/idx_reader.py to know where's the exact problem. In my case I was passing the wrong arguments. The command given in README *-images.ubyte.gz does not match filenames available on http://yann.lecun.com/exdb/mnist/. Try running the program using:

python test/mnist.py --images train-images-idx3-ubyte.gz --labels train-labels-idx1-ubyte.gz

vaibhaw avatar Nov 24 '15 15:11 vaibhaw