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

lstm_seq2seq.py not working correctly, gives same output no matter the input #1906

Open
eddiemay opened this issue Aug 5, 2024 · 1 comment
Assignees

Comments

@eddiemay
Copy link

eddiemay commented Aug 5, 2024

Issue Type

Bug

Source

source

Keras Version

Keras 3.3.3

Custom Code

No

OS Platform and Distribution

macOS 14.5

Python version

3.11.9

GPU model and memory

Apple M1

Current Behavior?

model.predict will give the same exact result no matter the input. I have done simple examples to just echo back the input where input and output are the same and still can't get it to have an accuracy above 76% then when model is verified at the end it will output the same result no matter the input. I finally just downloaded the tutorial code without modification and it too gives the same output no matter the input.

Standalone code to reproduce the issue or tutorial link

https://github.com/keras-team/keras-io/blob/master/examples/nlp/lstm_seq2seq.py

Relevant log output

-
Input sentence: Go.
Decoded sentence: Je suis prêt.

-
Input sentence: Go.
Decoded sentence: Je suis prêt.

-
Input sentence: Go.
Decoded sentence: Je suis prêt.

-
Input sentence: Go.
Decoded sentence: Je suis prêt.

-
Input sentence: Hi.
Decoded sentence: Je suis prêt.

-
Input sentence: Hi.
Decoded sentence: Je suis prêt.

-
Input sentence: Run!
Decoded sentence: Je suis prêt.

-
Input sentence: Run!
Decoded sentence: Je suis prêt.

-
Input sentence: Run!
Decoded sentence: Je suis prêt.

-
Input sentence: Run!
Decoded sentence: Je suis prêt.

-
Input sentence: Run!
Decoded sentence: Je suis prêt.

-
Input sentence: Run!
Decoded sentence: Je suis prêt.

-
Input sentence: Run!
Decoded sentence: Je suis prêt.

-
Input sentence: Run!
Decoded sentence: Je suis prêt.

-
Input sentence: Run.
Decoded sentence: Je suis prêt.

-
Input sentence: Run.
Decoded sentence: Je suis prêt.

-
Input sentence: Run.
Decoded sentence: Je suis prêt.

-
Input sentence: Run.
Decoded sentence: Je suis prêt.

-
Input sentence: Run.
Decoded sentence: Je suis prêt.

-
Input sentence: Run.
Decoded sentence: Je suis prêt.
@eddiemay
Copy link
Author

eddiemay commented Aug 6, 2024

I have tested it with the latest version of Keras (3.4.1) and it seems to preform better. The output is not the same as the code lab but it is at least giving different outputs for different inputs. Keras 3.4.1 is working good for the actual project I am working on with this code which is transforming Messoritic Hebrew Text into Dead Sea Scroll Hebrew i.e. (transform אֱלֹהֵ֖ינוּ to אלוהינו)

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

2 participants