Skip to content

Commit

Permalink
Add build method to supress warning (keras-team#20729)
Browse files Browse the repository at this point in the history
  • Loading branch information
shashaka authored Jan 6, 2025
1 parent 881d8da commit 1adaaec
Showing 1 changed file with 13 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,19 @@ def __init__(
seed=self.seed,
)

def build(self, input_shape):
if self.brightness_factor is not None:
self.random_brightness.build(input_shape)

if self.contrast_factor is not None:
self.random_contrast.build(input_shape)

if self.saturation_factor is not None:
self.random_saturation.build(input_shape)

if self.hue_factor is not None:
self.random_hue.build(input_shape)

def transform_images(self, images, transformation, training=True):
if training:
if backend_utils.in_tf_graph():
Expand Down

0 comments on commit 1adaaec

Please sign in to comment.