Skip to content

Instantly share code, notes, and snippets.

@AyishaR
Created April 10, 2021 16:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save AyishaR/e5a0b361308199689510aa2a14267209 to your computer and use it in GitHub Desktop.
Save AyishaR/e5a0b361308199689510aa2a14267209 to your computer and use it in GitHub Desktop.
# Normalizing the pixel values for faster convergence
normalization_layer = layers.experimental.preprocessing.Rescaling(1./255)
train_df = train_df.map(lambda x, y: (normalization_layer(x), y))
test_df = test_df.map(lambda x, y: (normalization_layer(x), y))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment