Skip to content

Commit

Permalink
Cherrypick for RandomContrast update (keras-team#16435)
Browse files Browse the repository at this point in the history
* Enable the keras dtensor API in OSS.

PiperOrigin-RevId: 438858608

* Switching learning/brain dependency to OSS compatible test_util

This is one test file failing, due to the monkey patching happens in the dtensor.init(), and I will need to dig more about the root cause (probably due to patching tf.Variable with DVariable, and cause logic difference for instance type checking.)

PiperOrigin-RevId: 439676157

* Update the docstring for keras.dtensor components.

1. Add docstring for LayoutMap.
2. Hide certain methods for keras.dtensor.optimizers.

PiperOrigin-RevId: 442651549

* add no-op label augmentation to RandomContrast

PiperOrigin-RevId: 439938098

Co-authored-by: Luke Wood <[email protected]>
  • Loading branch information
qlzh727 and LukeWood authored Apr 18, 2022
1 parent 970c060 commit 6c1c410
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions keras/layers/preprocessing/image_preprocessing.py
Original file line number Diff line number Diff line change
Expand Up @@ -1438,6 +1438,9 @@ def augment_image(self, image, transformation=None):
output.set_shape(image.shape)
return output

def augment_label(self, label, transformation=None):
return label

def compute_output_shape(self, input_shape):
return input_shape

Expand Down

0 comments on commit 6c1c410

Please sign in to comment.