Skip to content

Instantly share code, notes, and snippets.

@doleron
Created April 8, 2023 21:28
Show Gist options
  • Save doleron/d873d174058a53ef4fb6229b39e1231f to your computer and use it in GitHub Desktop.
Save doleron/d873d174058a53ef4fb6229b39e1231f to your computer and use it in GitHub Desktop.
data_augmentation = tf.keras.Sequential([
tf.keras.layers.RandomFlip("horizontal"),
tf.keras.layers.RandomRotation(0.01),
tf.keras.layers.RandomBrightness(factor=0.2, value_range=(0., 1.)),
tf.keras.layers.GaussianNoise(0.002),
tf.keras.layers.RandomZoom(height_factor=(-0.1, 0.1))
])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment