-
Notifications
You must be signed in to change notification settings - Fork 2.1k
WIP Keras 3 captcha_ocr #1609
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
WIP Keras 3 captcha_ocr #1609
Conversation
@fchollet I could use your thoughts on two things here.
prediction_model = keras.models.Model(
model.get_layer(name="image").input, model.get_layer(name="dense2").output
) Which fails on predict like this...
Is this a valid use case? And valid bug? Thanks! |
Yes, looks like a bug indeed. The use case looks valid as far as I can tell.
It's no longer meant to be public. The version copied from the old Keras backend also isn't too great since it relies heavily on I think the long-term fix would be to introduce a cross-backend CTC op, maybe written from scratch. Right now none of the solutions are satisfying. Seems like a big gap tbh, CTC is still the reference for OCR problems today. CTC was already completed left behind in TF 2, for what it's worth. Not sure why. Only TF 1 had some support (and even then it was barely usable, hence why we had these hefty backend functions to work around TF 1 APIs). |
I debugged the "functional model issue" and as it turns out the framework is fine. However there was a semantic change in Keras 3 (which is more consistent now). The code tried to query So you need to modify the prediction model creation as such:
the |
Thanks! I will re-render this guide. |
12e18cb
to
936dd23
Compare
Done! All rendered. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Copying the old code (compat.v1 and all) is still the least bad option.
Not ready to land, but opening for some questions...