EderSantana / seya

Bringing up some extra Cosmo to Keras.
Other
377 stars 103 forks source link

Runtime error while running stateful_text_generation.py #43

Closed magnolini closed 7 years ago

magnolini commented 7 years ago

Hi @EderSantana ,

I'm trying to run your example stateful_text_generation.py, but I'm having this error:

Build model... Traceback (most recent call last): File "/home/simone/PycharmProjects/autoEncoder/seya-master/examples/stateful_text_generation.py", line 60, in output_dim=512, return_sequences=True)) File "/usr/local/lib/python2.7/dist-packages/keras/models.py", line 114, in add layer.create_input_layer(batch_input_shape, input_dtype) File "/usr/local/lib/python2.7/dist-packages/keras/engine/topology.py", line 341, in create_input_layer self(x) File "/usr/local/lib/python2.7/dist-packages/keras/engine/topology.py", line 458, in call self.build(input_shapes[0]) TypeError: build() takes exactly 1 argument (2 given)

I'm using keras 1.0.6 and I have the same error with both theano (0.8.2) or tensorflow (0.8). Thank you in advance for your help

Simone

EderSantana commented 7 years ago

@magnolini statefulness has been added in keras itself. check here for modern way to do it http://keras.io/getting-started/faq/#how-can-i-use-stateful-rnns