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

Updates Keras CV - Classification guide for Keras 3 #1661

Merged
merged 5 commits into from
Nov 30, 2023

Conversation

sampathweb
Copy link
Contributor

No description provided.

Copy link
Contributor

@fchollet fchollet left a 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.
Copy link
Contributor

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?

Copy link
Contributor Author

@sampathweb sampathweb Nov 30, 2023

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.

Copy link
Contributor

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks. Done

Copy link
Collaborator

@pcoet pcoet left a 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
Copy link
Collaborator

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".)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks. Done.

Copy link
Collaborator

@pcoet pcoet left a 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!

Copy link
Contributor

@fchollet fchollet left a comment

Choose a reason for hiding this comment

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

LGTM, thank you!

@fchollet fchollet merged commit bab888f into keras-team:master Nov 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants