Skip to content

Commit 4bcc3b9

Browse files
author
(Ian Stenbit)
committed
Migrate to absl logging
1 parent 2e2670e commit 4bcc3b9

File tree

5 files changed

+7
-7
lines changed

5 files changed

+7
-7
lines changed

examples/layers/preprocessing/cut_mix_demo.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
import tensorflow as tf
99
import tensorflow_datasets as tfds
1010

11-
from keras_cv.layers.preprocessing import cut_mix
11+
from keras_cv.layers import preprocessing
1212

1313
IMG_SIZE = (224, 224)
1414
BATCH_SIZE = 64
@@ -33,7 +33,7 @@ def main():
3333
.shuffle(10 * BATCH_SIZE)
3434
.batch(BATCH_SIZE)
3535
)
36-
cutmix = cut_mix.CutMix(1.0)
36+
cutmix = preprocessing.CutMix(1.0)
3737
train_ds = train_ds.map(cutmix, num_parallel_calls=tf.data.AUTOTUNE)
3838

3939
for images, labels in train_ds.take(1):

examples/layers/preprocessing/mix_up_demo.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
import tensorflow as tf
99
import tensorflow_datasets as tfds
1010

11-
from keras_cv.layers.preprocessing import mix_up
11+
from keras_cv.layers import preprocessing
1212

1313
IMG_SIZE = (224, 224)
1414
BATCH_SIZE = 64
@@ -33,7 +33,7 @@ def main():
3333
.shuffle(10 * BATCH_SIZE)
3434
.batch(BATCH_SIZE)
3535
)
36-
mixup = mix_up.MixUp(1.0, alpha=0.8)
36+
mixup = preprocessing.MixUp(1.0, alpha=0.8)
3737
train_ds = train_ds.map(mixup, num_parallel_calls=tf.data.AUTOTUNE)
3838

3939
for images, labels in train_ds.take(1):

keras_cv/layers/preprocessing/cut_mix.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
# limitations under the License.
1414
import tensorflow as tf
1515
import tensorflow.keras.layers as layers
16-
from tensorflow.python.platform import tf_logging as logging
16+
from absl import logging
1717

1818

1919
class CutMix(layers.Layer):

keras_cv/layers/preprocessing/mix_up.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
# limitations under the License.
1414
import tensorflow as tf
1515
import tensorflow.keras.layers as layers
16-
from tensorflow.python.platform import tf_logging as logging
16+
from absl import logging
1717

1818

1919
class MixUp(layers.Layer):

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
author="Keras team",
2525
author_email="[email protected]",
2626
license="Apache License 2.0",
27-
install_requires=["packaging", "tensorflow"],
27+
install_requires=["packaging", "tensorflow", "absl-py"],
2828
extras_require={
2929
"tests": ["flake8", "isort", "black", "pytest"],
3030
"examples": ["tensorflow_datasets", "matplotlib"],

0 commit comments

Comments
 (0)