Last active
October 15, 2020 20:35
-
-
Save esmitt/cc4a1342aa46131f8024c0d48c0a334d to your computer and use it in GitHub Desktop.
Fit model function in Tensorflow 2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
batch_size = 64 | |
""" | |
Training the model for 60 epochs using our dataset. | |
The batch size (64) is the same for the validation data. | |
Only 1 callback was used, but could be more like TensorBoard, ModelCheckpoint, etc. | |
""" | |
history = model.fit(train_ds.batch(batch_size=batch_size), | |
epochs=60, | |
validation_data=validation_ds.batch(batch_size=batch_size), | |
callbacks=[early_callback]) | |
model.save('model_base') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment