-
Notifications
You must be signed in to change notification settings - Fork 74.2k
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
FR for keras.preprocessing.image_dataset_from_directory label_mode parameter to accept enum as input #46727
Comments
What does that mean? |
By accepting a string as input, typos can be made and no autocompletion can be offered by the IDE, which is however the case when using an enum. My proposition is to add support for an alternative input type using an enumeration, such as What do you think? |
tf.keras.preprocessing.image_dataset_from_directory will be deprecated in future Tensorflow version, prefer loading data with tf.keras.utils.image_dataset_from_directory, and then transforming the output tf.data.Dataset with preprocessing layers. |
This issue has been automatically marked as stale because it has no recent activity. It will be closed if no further activity occurs. Thank you. |
Closing as stale. Please reopen if you'd like to work on this further. |
System information
Describe the feature and the current behavior/state.
When calling the
tf.keras.preprocessing.image_dataset_from_directory()
function, the parameterlabel_mode=
accepts 3 values:int
,categorical
andbinary
. However, the string object is not deterministic: for that, I propose to add another option, which would be to specify the value using an enumeration which IS deterministic.Will this change the current api? How?
No
Who will benefit with this feature?
Users who want more structured code.
Any Other info.
This behavior is, as far as I know, already available for some features in Keras.
The text was updated successfully, but these errors were encountered: