Skip to content

Commit

Permalink
Include RRC with_targets (#597)
Browse files Browse the repository at this point in the history
  • Loading branch information
LukeWood authored Jul 18, 2022
1 parent c49889a commit 36ada9c
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
3 changes: 3 additions & 0 deletions keras_cv/layers/preprocessing/random_resized_crop.py
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,9 @@ def _check_class_arguments(
f"aspect_ratio_factor={aspect_ratio_factor}"
)

def augment_target(self, augment_target, **kwargs):
return augment_target

def get_config(self):
config = super().get_config()
config.update(
Expand Down
9 changes: 9 additions & 0 deletions keras_cv/layers/preprocessing/with_labels_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,15 @@
TEST_CONFIGURATIONS = [
("AutoContrast", preprocessing.AutoContrast, {"value_range": (0, 255)}),
("Equalization", preprocessing.Equalization, {"value_range": (0, 255)}),
(
"RandomResizedCrop",
preprocessing.RandomResizedCrop,
{
"target_size": (224, 224),
"crop_area_factor": (0.8, 1.0),
"aspect_ratio_factor": (3 / 4, 4 / 3),
},
),
("Grayscale", preprocessing.Grayscale, {}),
("GridMask", preprocessing.GridMask, {}),
(
Expand Down

0 comments on commit 36ada9c

Please sign in to comment.