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

Multi label classification conversion #18772

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

ben-ad
Copy link

@ben-ad ben-ad commented Nov 13, 2023

  • Replaced imports of Keras and Keras.layers
  • Added a comment regarding the inclusion of TextVectorization layer in a Keras.model which would work only when the backend is TensorFlow

Git Diff can be seen here: ben-ad@2cc0190

@fchollet
Copy link
Member

Thanks for the PR!

  • Can you provide the git diff?
  • Did you run it on all 3 backends?

@ben-ad
Copy link
Author

ben-ad commented Nov 13, 2023

@fchollet : the code runs well on all 3 backends, in particular for fitting a Keras model, up to the section where the text preprocessing (TextVectorization layer) is included within a Keras.model (line 388). This part only works with TensorFlow.

I understand that this is expected since TextVectorization layer uses TensorFlow internally and it is recommended that it be used outside of the model itself.

Title: Large-scale multi-label text classification
Author: [Sayak Paul](https://twitter.com/RisingSayak), [Soumik Rakshit](https://github.com/soumik12345)
Date created: 2020/09/25
Last modified: 2023/11/13 (conversion to Keras 3 by @ben-ad)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add a line "Converted to Keras 3 by:" at the end instead

asynchronous data processing.
"""

# Create a model for inference.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since this won't work for other backends, better to show an example where we map the text_vectorizer into the tf.data Dataset. We need the code to run with all backends.

@gbaned gbaned added this to Assigned Reviewer in PR Queue via automation Nov 14, 2023
Copy link

This PR is stale because it has been open for 14 days with no activity. It will be closed if no further activity occurs. Thank you.

@github-actions github-actions bot added the stale label Nov 30, 2023
@gbaned
Copy link
Collaborator

gbaned commented Dec 1, 2023

Hi @ben-ad Can you please check @fchollet's comments and keep us posted ? Thank you!

Copy link

This PR is stale because it has been open for 14 days with no activity. It will be closed if no further activity occurs. Thank you.

@github-actions github-actions bot added the stale label Dec 16, 2023
@gbaned
Copy link
Collaborator

gbaned commented Dec 29, 2023

Hi @ben-ad Any update on this PR? Please. Thank you!

@gbaned
Copy link
Collaborator

gbaned commented Jan 5, 2024

Hi @ben-ad Any update on this PR? Please. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
PR Queue
Assigned Reviewer
Development

Successfully merging this pull request may close these issues.

None yet

4 participants