Solution for me
from keras import layers layers.RandomFlip("horizontal")
OR
from keras.layers import RandomFlip RandomFlip("horizontal")