Last active
September 29, 2019 05:20
-
-
Save AFAgarap/6a47ef9ec39b294a032fc0ab5f3c2683 to your computer and use it in GitHub Desktop.
Compiling TensorFlow 2.0 Subclassing API model. Link to blog: https://towardsdatascience.com/how-can-i-trust-you-fb433a06256c?source=friends_link&sk=0af208dc53be2a326d2407577184686b
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
model = LeNet(num_classes=10) | |
model.compile(loss=tf.losses.categorical_crossentropy, | |
optimizer=tf.optimizers.SGD(learning_rate=1e-1, decay=1e-6, momentum=9e-1), | |
metrics=['accuracy']) | |
model.fit(train_dataset, | |
epochs=60, | |
validation_data=validation_dataset, | |
verbose=2) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment