Created
September 23, 2020 02:46
-
-
Save abhishek-shrm/583ea2fe8899a750b43e1b29eadc2869 to your computer and use it in GitHub Desktop.
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
# Compile Model | |
model.compile(optimizer='adam',loss='binary_crossentropy',metrics=["accuracy"]) | |
# Callbacks | |
es=EarlyStopping(monitor='val_loss', mode='min', verbose=1,patience=5,min_delta=1e-5) | |
mc = ModelCheckpoint("/kaggle/working/model.hdf5", monitor='val_loss', verbose=0, | |
save_best_only=True, mode='min') | |
# Training the model | |
model.fit(x_train_split,y_train_split, batch_size=512, epochs=100, verbose=1, | |
validation_data=(x_valid_split,y_valid_split), callbacks=[es,mc]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment