- auc, earlystopping
model.compile(‘adagrad‘, ‘binary_crossentropy‘,
metrics=[‘binary_crossentropy‘, tf.keras.metrics.AUC(name=‘auc‘, num_thresholds=2000)])
callback = EarlyStopping(monitor="val_auc", patience=2, verbose=0, mode=‘max‘, baseline=0.6)
hist_ = model.fit(train_input, train_label,
# validation_split=0.2,
validation_data=(test_input, test_label),
shuffle="batch",
batch_size=BATCH_SIZE, epochs=epochs, initial_epoch=0, verbose=1,
callbacks=[callback])
print(‘hist_‘, hist_)