Failed test case: hist has incorrect type. Expected: <class 'keras.callbacks.History'>, but got: <class 'NoneType'>

I don’t know why I am getting this error.




Unless there is somekind of update I would suggest to try:

from tensorflow import keras

and then use the class inheritance from keras.callbacks.Callback. It might be the grader expects it in this format…

I tried, Sir but it did not work out for me

Hello @Ankur_Bhatt,
Please refer to this topic

Grader feedback is valid.
Here’s the correct way to initialize hist:
hist = train_mnist(x_train, y_train)

1 Like

It worked. Thank you all.

@Ankur_Bhatt Happy learning!