Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

About the method of passing encoder states to decoder #6

Open
mrgloom opened this issue May 22, 2020 · 0 comments
Open

About the method of passing encoder states to decoder #6

mrgloom opened this issue May 22, 2020 · 0 comments

Comments

@mrgloom
Copy link

mrgloom commented May 22, 2020

Based on lstm_seq2seq.py example seems there is a better way to pass encoder states to decoder:

https://github.com/keras-team/keras/blob/7a39b6c62d43c25472b2c2476bd2a8983ae4f682/examples/lstm_seq2seq.py#L129-L132

https://github.com/keras-team/keras/blob/7a39b6c62d43c25472b2c2476bd2a8983ae4f682/examples/lstm_seq2seq.py#L139-L141

compared to

encoder = LSTM(64, return_sequences=False)(encoder)
decoder = Embedding(output_dict_size, 64, input_length=output_length, mask_zero=True)(decoder_input)
decoder = LSTM(64, return_sequences=True)(decoder, initial_state=[encoder, encoder])

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant