Skip to content

Commit 6c1c410

Browse files
qlzh727LukeWood
andauthored
Cherrypick for RandomContrast update (#16435)
* 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 <lukewood@google.com>
1 parent 970c060 commit 6c1c410

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

keras/layers/preprocessing/image_preprocessing.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1438,6 +1438,9 @@ def augment_image(self, image, transformation=None):
14381438
output.set_shape(image.shape)
14391439
return output
14401440

1441+
def augment_label(self, label, transformation=None):
1442+
return label
1443+
14411444
def compute_output_shape(self, input_shape):
14421445
return input_shape
14431446

0 commit comments

Comments
 (0)