tf.keras.layers.experimental.preprocessing.RandomRotation

Randomly rotate each image.

Inherits From: PreprocessingLayer, Layer, Module

Used in the notebooks

Used in the guide Used in the tutorials

By default, random rotations are only applied during training. At inference time, the layer does nothing. If you need to apply random rotations at inference time, set training to True when calling the layer.

Input shape:

4D tensor with shape: (samples, height, width, channels), data_format='channels_last'.

Output shape:

4D tensor with shape: (samples, height, width, channels), data_format='channels_last'.

ValueError if either bound is not between [0, 1], or upper bound is less than lower bound.