Last active
July 25, 2021 11:12
-
-
Save Kakarot-2000/ee0c107f1b0a13c0e5eab7c7c7c6bd20 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
x_train=x_train.astype('float32') | |
x_test=x_test.astype('float32') | |
#intializing callbacks | |
early_stopping=keras.callbacks.EarlyStopping(patience=15,restore_best_weights=True) | |
model1.compile(optimizer='Adam',loss='categorical_crossentropy',metrics=['accuracy']) | |
model1.fit(x_train,y_train, | |
batch_size=64, | |
epochs=50, | |
validation_data=(x_test,y_test), | |
verbose=1,callbacks=[early_stopping]) | |
print(model1.evaluate(x_test,y_test)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment