Skip to content

Commit

Permalink
Update Requirements
Browse files Browse the repository at this point in the history
  • Loading branch information
sampathweb committed Nov 14, 2023
1 parent 6b7495f commit 4dae3e5
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 9 deletions.
2 changes: 0 additions & 2 deletions keras_cv/backend/ops.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@

if keras_3():
from keras.ops import * # noqa: F403, F401
# TODO: Remove once `is_tensor` is an public API
from keras.src.ops import is_tensor # noqa: F403, F401
from keras.preprocessing.image import smart_resize # noqa: F403, F401
else:
try:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
from keras_cv.backend import keras
from keras_cv.backend import scope
from keras_cv.backend.config import multi_backend
from keras_cv.backend.random import RandomGenerator
from keras_cv.utils import preprocessing

# In order to support both unbatched and batched inputs, the horizontal
Expand Down Expand Up @@ -125,14 +124,14 @@ def augment_image(self, image, transformation):
```
Note that since the randomness is also a common functionality, this layer
also includes RandomGenerator, which can be used to
also includes a keras_backend.RandomGenerator, which can be used to
produce the random numbers. The random number generator is stored in the
`self._random_generator` attribute.
"""

def __init__(self, seed=None, **kwargs):
force_generator = kwargs.pop("force_generator", False)
self._random_generator = RandomGenerator(
self._random_generator = keras_backend.RandomGenerator(
seed=seed, force_generator=force_generator
)
super().__init__(**kwargs)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
from keras_cv.api_export import keras_cv_export
from keras_cv.backend import keras
from keras_cv.backend import scope
from keras_cv.backend.random import RandomGenerator
from keras_cv.backend.config import multi_backend
from keras_cv.utils import preprocessing

Expand Down Expand Up @@ -104,14 +103,14 @@ def __init__(self):
```
Note that since the randomness is also a common functionality, this layer
also includes RandomGenerator, which can be used to
also includes a keras_backend.RandomGenerator, which can be used to
produce the random numbers. The random number generator is stored in the
`self._random_generator` attribute.
"""

def __init__(self, seed=None, **kwargs):
force_generator = kwargs.pop("force_generator", False)
self._random_generator = RandomGenerator(
self._random_generator = keras_backend.RandomGenerator(
seed=seed, force_generator=force_generator
)
super().__init__(**kwargs)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ def augment_pointclouds(self, point_clouds, transformation):
```
Note that since the randomness is also a common functionality, this layer
also includes RandomGenerator, which can be used to
also includes a keras.backend.RandomGenerator, which can be used to
produce the random numbers. The random number generator is stored in the
`self._random_generator` attribute.
"""
Expand Down

0 comments on commit 4dae3e5

Please sign in to comment.