Skip to content

Instantly share code, notes, and snippets.

@mkvenkit
Last active January 17, 2021 02:50
Show Gist options
  • Save mkvenkit/83ae7db1e2851adb3ac6510db3d09000 to your computer and use it in GitHub Desktop.
Save mkvenkit/83ae7db1e2851adb3ac6510db3d09000 to your computer and use it in GitHub Desktop.
simple_audio_pi NN
model.compile(
optimizer=tf.keras.optimizers.Adam(),
loss=tf.keras.losses.SparseCategoricalCrossentropy(from_logits=True),
metrics=['accuracy'],
)
EPOCHS = 10
history = model.fit(
train_ds,
validation_data=val_ds,
epochs=EPOCHS,
callbacks=tf.keras.callbacks.EarlyStopping(verbose=1, patience=2),
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment