Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Mobile machine learning with Fritz. https://fritz.ai
keras.backend.clear_session()
# Retrain the model with our new configuration and callback
model = build_model()
model.compile(
keras.optimizers.Adam(lr=metadata['learning_rate']),
loss=keras.losses.sparse_categorical_crossentropy,
metrics=[keras.metrics.sparse_categorical_accuracy]
)
model.fit(
x_train[:, :, :, None],
y_train[:, None],
epochs=5,
batch_size=metadata['batch_size'],
validation_split=0.05,
callbacks=[fritz_callback]
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.