seq2seq icon indicating copy to clipboard operation
seq2seq copied to clipboard

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

Open data-ant opened this issue 7 years ago • 1 comments

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 avatar Aug 11 '17 07:08 data-ant

@@farizrahman4u

data-ant avatar Aug 11 '17 07:08 data-ant