Potential bug of the dynamic_decoder
opened this issue · comments
Deleted user commented
If I set the num_units
of the cell in decoder as the twice as the one in encoder (just like what the tutorial does), everything goes well. But If I set, say, both of the encoder and decoder's cell have the same num_units
. Then the incompatible shape error occurs. Is it related to the LSTM
issue? Thanks.
Matvey Ezhov commented
Not a bug.
This is because encoder is bidirectional, and encoder state is passed to decoder as-is. You can instead put a linear layer between encoder final state and decoder initial state and use whatever dimensionality you like.
Deleted user commented
@ematvey Oh yes, sorry I made a stupid mistake.