Created
August 24, 2021 14:26
-
-
Save dpoulopoulos/de1d3d1725c90a85d050ee46cfa15f08 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| input_tensor = tf.keras.layers.Input(shape=(224, 224, 3), name="image") | |
| model = tf.keras.applications.EfficientNetB0( | |
| input_tensor=input_tensor, weights=None, classes=91 | |
| ) | |
| model.compile( | |
| optimizer=tf.keras.optimizers.Adam(), | |
| loss=tf.keras.losses.SparseCategoricalCrossentropy(), | |
| metrics=[tf.keras.metrics.SparseCategoricalAccuracy()], | |
| ) | |
| model.fit( | |
| x=get_dataset(train_filenames, batch_size), | |
| epochs=epochs, | |
| steps_per_epoch=steps_per_epoch, | |
| verbose=1, | |
| ) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment