I used this callback in autokeras:
from tensorflow.keras.callbacks import EarlyStopping
early_stopping = EarlyStopping(monitor='val_loss', patience=5)
auto_ml.fit(x=x_train, y=y_train, validation_data=(x_test, y_test), class_weight=class_weights, callbacks=[early_stopping])
Training was done, i tried to evaluate with model but i got this error:
ml.evaluate(x_test, y_test)
enter image description here enter image description here
I tried to use model came out from autokeras with early_stopping callback. Without callback, my code was fine.