-
Notifications
You must be signed in to change notification settings - Fork 328
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
Improve keras 3 detection #2132
Improve keras 3 detection #2132
Conversation
/gcbrun |
97cf251
to
53a209a
Compare
1b78749
to
6203623
Compare
42d6798
to
4883a17
Compare
/gcbrun |
/gcbrun |
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.
Left a few comments. I am a little suspicious of the tf_ops.py
file changes, but I may not be fully understand that yet.
/gcbrun |
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.
Looks good! Only big question is with random
. I don't think we should import tensorflow.random
and keras.random
as if they were interchangeable.
@@ -25,5 +28,5 @@ | |||
from keras_core.src.utils.image_utils import ( # noqa: F403, F401 | |||
smart_resize, | |||
) | |||
else: | |||
if not multi_backend(): | |||
from keras_cv.backend.tf_ops import * # noqa: F403, F401 |
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.
Why are we importing tf_ops
twice? Once here and once from the toplevel __init__.py
? Do we need both?
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.
I think this was added to have tf_ops to be available through keras_cv.backend.ops.*
instead of keras_cv.backend.tf_ops.*
/gcbrun |
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.
Very nice work! This looks great!
* improve keras 3 detection * update __init__ * update config * update config to update multibackend flag * updated spelling error * updatconfig * update tf_ops * update tf -ops * update tf ops * undo last commit * update tf_ops.py * reformat * update init() * update minor error in tf ops * remove check for keras 3 * revert changes to tf_ops * disable layers using internal base random layer * update syntax error * update imports in keras version check layer * update init method in keras version check * add seed argument * rasie error in class itself * update constructor * update to import directly from layers * update import in base image augmenattion layer * change import sin tf_ops * update tf ops import * change init * update tf_ops * update backend functions * keras.src * update namespace * update namescope correctly * code reformat * reformat and add backend functions * modified ops import * reformat * update ops * update backend * update ops * code reformatted * update import * update imports in ops * update error message * review changes added * update keras imports * update imports * update imports * update import in random.py * add issues link * code reformat * code reformat * review comments addressed * code reformat
To-dos added for after this PR is merged
convert these layers to keras 3. These layers are disabled for keras 3 for now.
dropblock_2d: #2135
BaseAugmentationLayer3D: #2136
fix legacy keras.engine import in predict_utils.py
#2134
These changes have been tested here
https://colab.sandbox.google.com/drive/1pGSji4tto6Fu88LXR0z4p7ExJZWNajGK#scrollTo=9s7Q0WbIa6vB