Skip to content

Instantly share code, notes, and snippets.

@negedng
Created October 18, 2020 22:04
Show Gist options
  • Save negedng/04e033c6c3663633c8fa814cce0b7a32 to your computer and use it in GitHub Desktop.
Save negedng/04e033c6c3663633c8fa814cce0b7a32 to your computer and use it in GitHub Desktop.
ds2_train = (
ds2_train
.shuffle(100000)
.batch(32)
.prefetch(tf.data.experimental.AUTOTUNE)
)
ds2_val = (
ds2_val
.batch(32)
.prefetch(tf.data.experimental.AUTOTUNE)
)
model = get_model()
model.compile("adam", "binary_crossentropy", metrics=["accuracy"])
model.fit(ds2_train, epochs=3, validation_data=ds2_val)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment