-
Notifications
You must be signed in to change notification settings - Fork 2.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
Updates Keras CV - Classification guide for Keras 3 #1661
Conversation
9f0e68b
to
916402f
Compare
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.
Thanks for the PR!
@@ -496,10 +599,45 @@ keras_cv.visualization.plot_image_gallery( | |||
) | |||
``` | |||
|
|||
<div class="k-default-codeblock"> | |||
``` | |||
WARNING:tensorflow:Using a while_loop for converting RngReadAndSkip cause there is no registered converter for this op. |
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.
Do you know the cause of all these warnings? Is this something we could fix?
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.
Yes, its coming from the call to random_cutout
-
import numpy as np
import keras_cv
x = np.random.rand(1, 5, 5, 3)
random_cutout = keras_cv.layers.RandomCutout(width_factor=0.4, height_factor=0.4)
# Call of `random_cutout` causes this warning
_ = random_cutout(x)
From this line - https://github.com/keras-team/keras-cv/blob/master/keras_cv/utils/fill_utils.py#L84
images = tf.where(is_rectangle, fill_values, images)
is_rectangle
shape is(1, 5, 5, 1)
(Bool)fill_values
shape is(1, 5, 5, 3)
(float32)images
shape is(1, 5, 5, 3)
(float32)
Not sure why its happening.
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.
It doesn't look actionable. Please remove the warnings from the md
file manually, we'll merge.
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.
Thanks. Done
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, with one nit.
@@ -21,25 +21,43 @@ | |||
- Fine-tuning a pretrained backbone | |||
- Training a image classifier from scratch | |||
|
|||
KerasCV uses Keras 3 to work with any of TensorFlow, Pytorch and Jax. In the |
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.
"TensorFlow, Pytorch and Jax." -> "TensorFlow, PyTorch, or Jax." (Note spelling of "PyTorch".)
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.
Thanks. Done.
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, but one of the devs should review the code changes. Thanks!
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, thank you!
No description provided.