Explaining the use case: If you are doing Data Augmentation, then usually following sequence wiil work,
from tensorflow import keras
from tensorflow.keras import layers
data_augmentation = tf.keras.Sequential([
layers.RandomFlip("horizontal"),
layers.RandomRotation(0.1)
]
)