[code]Keras API的用法记录

  • 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_)

[code]Keras API的用法记录

上一篇:02 在Windows系统中创建一个Cordova项目


下一篇:在Java中使用redisTemplate操作缓存