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

tf.keras compatibility: convert multi-label-classification to Keras Core #18438

Open
Akorex opened this issue Jul 19, 2023 · 4 comments
Open
Assignees
Labels
stat:awaiting keras-eng Awaiting response from Keras engineer type:Bug

Comments

@Akorex
Copy link

Akorex commented Jul 19, 2023

for tf.keras backwards compatibility

In my attempt to port Large-scale multi-label classification to keras_core I hit an issue with the Inference Section. The example from keras.io created a new Inference model after training to include the TextVectorization preprocessing layer so inference can be done by passing strings directly to the model.

model_for_inference = keras.Sequential([text_vectorizer, shallow_mlp_model])

This didn't work for keras_core imports and the attempt to port the example didn't include the particular step from the example.

PR: keras-team/keras-core#538

Colab Notebook: https://colab.research.google.com/drive/1kR7W4BJhtDlA5Jx_e4EwUM2FnzKP-D58#scrollTo=xmf6rTLL0G9H

@grasskin
Copy link
Member

Thank you for opening this issue! I'm getting access denied on the colab notebook, could you change the permissions/send a different link?

@Akorex
Copy link
Author

Akorex commented Jul 19, 2023

I have updated the permissions to the notebook and you should have access to it now.

@fchollet
Copy link
Member

The notebook you shared doesn't seem to include the line model_for_inference = .... Can you post a shorter, more focused reproduction notebook?

@Akorex
Copy link
Author

Akorex commented Jul 25, 2023

I have added the line model_for_inference = ... in the new notebook. However, I hit an issue with layers.StringLookup() using the keras_code import which didn't exist with the tf.keras import

Notebook : https://colab.research.google.com/drive/134sncHaoAaV9xeV7fOHVDZMVu12rAUVI#scrollTo=iwVJj6dK0G9N

@fchollet fchollet transferred this issue from keras-team/keras-core Sep 22, 2023
@sachinprasadhs sachinprasadhs self-assigned this Apr 11, 2024
@sachinprasadhs sachinprasadhs added type:Bug stat:awaiting keras-eng Awaiting response from Keras engineer labels Apr 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stat:awaiting keras-eng Awaiting response from Keras engineer type:Bug
Projects
None yet
Development

No branches or pull requests

4 participants