farizrahman4u / seq2seq

Sequence to Sequence Learning with Keras
GNU General Public License v2.0
3.17k stars 845 forks source link

AttributeError: 'RecurrentSequential' object has no attribute 'model' #210

Open data-ant opened 7 years ago

data-ant commented 7 years ago

I just run the given attentionseq2seq model ,and it has some mistakes as following:

model = AttentionSeq2Seq(input_dim =5, input_length = 7, hidden_dim = 10, output_length=8, output_dim=20,depth=4)

~~~~~~~~~~~~~~~

Traceback (most recent call last): File "", line 1, in File "/usr/local/lib/python2.7/dist-packages/seq2seq/models.py", line 268, in AttentionSeq2Seq encoder = Bidirectional(encoder, merge_mode='sum')

~~~~~~~~~~~~~~~~~~~

File "/usr/local/lib/python2.7/dist-packages/keras/layers/wrappers.py", line 223, in init config = layer.get_config()

~~~~~~~~~~~~~~~~

File "/usr/local/lib/python2.7/dist-packages/recurrentshop/engine.py", line 1003, in get_config base_config = super(RecurrentSequential, self).get_config()

~~~~~~~~~~~~~~~~~~

File "/usr/local/lib/python2.7/dist-packages/recurrentshop/engine.py", line 753, in get_config config = {'model_config': self.model.get_config(),

~~~~~~~~~~~~~~~~

AttributeError: 'RecurrentSequential' object has no attribute 'model'

my keras verison is 2.0.4 tensorflow version is 1.0.1

Thanks~!

data-ant commented 7 years ago

@@farizrahman4u