Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
# 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