danieldjohnson / biaxial-rnn-music-composition

A recurrent neural network designed to generate classical music.
BSD 2-Clause "Simplified" License
1.92k stars 380 forks source link

Python AssertionError #8

Closed tux-00 closed 8 years ago

tux-00 commented 8 years ago

When I run "m = model.Model([300,300],[100,50], dropout=0.5)" I get a lot of this error :

<<!! BUG IN FGRAPH.REPLACE OR A LISTENER !!>> <type 'exceptions.Exception'> Constant{300} is already owned by another fgraph local_elemwise_alloc
ERROR (theano.gof.opt): Optimization failure due to: local_elemwise_alloc
ERROR (theano.gof.opt): node: Elemwise{add,no_inplace}(dot.0, Alloc.0)
ERROR (theano.gof.opt): TRACEBACK:
ERROR (theano.gof.opt): Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/theano/gof/opt.py", line 1822, in process_node
    fgraph.replace_all_validate(repl_pairs, reason=lopt)
  File "/usr/lib/python2.7/site-packages/theano/gof/toolbox.py", line 306, in replace_all_validate
    fgraph.replace(r, new_r, reason=reason, verbose=False)
  File "/usr/lib/python2.7/site-packages/theano/gof/fg.py", line 592, in replace
    self.change_input(node, i, new_r, reason=reason)
  File "/usr/lib/python2.7/site-packages/theano/gof/fg.py", line 530, in change_input
    self.__import_r__(new_r, reason=reason)
  File "/usr/lib/python2.7/site-packages/theano/gof/fg.py", line 363, in __import_r__
    self.__import__(variable.owner, reason=reason)
  File "/usr/lib/python2.7/site-packages/theano/gof/fg.py", line 394, in __import__
    raise Exception("%s is already owned by another fgraph" % r)
Exception: Constant{300} is already owned by another fgraph

and the process is never finish (waiting about two hours). I have changed the recursion limit with sys.setrecursionlimit() to 10.000 because an exception about recursion limit appears. But nothing.

I have an I7 core, are these errors normal ?

yunqiw commented 8 years ago

I got the same error, and I think it is something related to the current version of theano library. I have a working version of the previous theano libarary files@ https://github.com/yunqiw/pythonlib, you can replace the folders with the ones you have, it should work