Làm thế nào để nói Keras ngừng đào tạo dựa trên giá trị tổn thất?
Hiện tại tôi sử dụng mã sau: callbacks = [ EarlyStopping(monitor='val_loss', patience=2, verbose=0), ModelCheckpoint(kfold_weights_path, monitor='val_loss', save_best_only=True, verbose=0), ] model.fit(X_train.astype('float32'), Y_train, batch_size=batch_size, nb_epoch=nb_epoch, shuffle=True, verbose=1, validation_data=(X_valid, Y_valid), callbacks=callbacks) Nó yêu cầu Keras ngừng luyện tập khi tình trạng thua lỗ không được cải thiện trong 2 kỷ. Nhưng tôi muốn ngừng …