farizrahman4u / seq2seq

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

Dimension problem #187

Closed lhl881210 closed 7 years ago

lhl881210 commented 7 years ago

Hi,

I'v updated seq2seq to the newest one (3d402a2). However, when I used function seq2seq() with hidden_dim = 100 and output_dim = 4, it showed a error as following: ValueError: Dimensions must be equal, but are 100 and 4 for 'recurrent_sequential_2/model_9/lstm_decoder_cell_1/dense_15/MatMul' (op: 'MatMul') with input shapes: [?,100], [4,400].

I guess that [?,100] is [?,hidden_dim] and [4,400] is [output_dim,output_dim*hidden_dim]. So, maybe there are something wrong in the LSTMDecoderCell(), I'm not sure.

I have no idea to solve this problem. I would appreciate it if you could help me to solve this problem. Thanks.

farizrahman4u commented 7 years ago

@abhaikollara

abhaikollara commented 7 years ago

@lhl881210 The issue has been resolved, update seq2seq

lhl881210 commented 7 years ago

@abhaikollara Thanks!

uniaz commented 7 years ago

Hey, I'm getting the same problem when deserializing a saved model (seq2seq() ).

ValueError: Dimensions must be equal, but are 64 and 28 for 'recurrent_sequential_4/model_14_1/lstm_decoder_cell_2/dense_21/MatMul' (op: 'MatMul') with input shapes: [50,64], [28,112].

Here hidden_dim=64 and output_dim=28