-
Notifications
You must be signed in to change notification settings - Fork 74.1k
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
Non-deprecated tf.keras.preprocessing alternatives don't cover properly all the deprecated features #69834
Comments
@SMH17, Thank you! |
Referring to the example above. In Keras I don't see any deprecation mark in RandomShear layer that seems has been moved in keras-cv package but I cannot find any non-deprecated alternative in Keras module integrated in TensorFlow. |
@SMH17, |
This issue is stale because it has been open for 7 days with no activity. It will be closed if no further activity occurs. Thank you. |
This issue was closed because it has been inactive for 7 days since being marked as stale. Please reopen if you'd like to work on this further. |
Issue type
Others
Have you reproduced the bug with TensorFlow Nightly?
Yes
Source
source
TensorFlow version
2.16.1
Custom code
No
OS platform and distribution
No response
Mobile device
No response
Python version
No response
Bazel version
No response
GCC/compiler version
No response
CUDA/cuDNN version
No response
GPU model and memory
No response
Current behavior?
tf.keras.preprocessing
is deprecated .ImageDataGenerator
is deprecated, but still there isn't any non-deprecated approach to consistently cover its features despite it's been a while already since the deprecation mark appeared.E.g.
Consider you want to include random translations, rotations, and shear augmentations (very common augmentations, nothing unusual), with
ImageDataGenerator
you could do this in a very practical and concise way without forcing you to create your own augmentation functions (and if you needed more than built in features nothing prevented you to usepreprocessing_function
argument to pass your custom function or using different approaches).Ok we know that "Google way" is "deprecate code in bulk" ...but what is supposed to be the recommended alternative approach now?
tf.keras.utils.image_dataset_from_directory
doesn't support any augmentation and so it is needed to manually combine it with image transformation functions to achieve same result,
but if as alternative you try to use a preprocessing pipeline with functions of
tf.image
, intf.image
, shear transformation seems surprisingly missing.if instead you try to use as alternative
tf.keras.layers
there are various transformation layers, but not for everything in deprecation wagon and shear transformation seems missing also there, andtf.keras.preprocessing.image.random_shear
is deprecated too.(Not mentioning the past deprecation of
tfa.image.*
andtf.contrib.keras.preprocessing.*
)Standalone code to reproduce the issue
Relevant log output
No response
The text was updated successfully, but these errors were encountered: