Failed test case: history has incorrect type.
Expected:
<class ‘keras.callbacks.History’>,
but got:
<class ‘NoneType’>.
I’m getting this issue in week 3 assignment of Introduction to TensorFlow for Artificial Intelligence, Machine Learning, and Deep Learning
Do you have this line in the notebook?
history = model.fit(training_images, training_labels, epochs=10, callbacks=[callbacks])
Yes …it’s running accordingly . But on submission this above error is being generated.
Please click my name and message your notebook as an attachment.
Please fix this line in your code:
history = model.fit(training_images, training_labels, epochs=10, callbacks=[callbacks]). tf.keras.callbacks.History
Fixed but still same error
You’ve not fixed the error. Here it is:
history = model.fit(training_images, training_labels, epochs=10, callbacks=[callbacks]). tf.keras.callbacks.History
@Isaac_Owusu_Mensah
There’s no need for you to load the dataset again inside def train_mnist(x_train, y_train):
.
They are passed in as function arguments.
Since path
is undefined within the function scope, you get an undefined variable error.
Sir,
I corrected the code. But still having errors in the grader. Please, what do I do?
[code removed - moderator]
Few things @Isaac_Owusu_Mensah :
- Please don’t post notebook / code in public. Use these artifacts in direct message to a mentor.
- You are still loading data within
train_mnist
. Did you have trouble understanding my previous feedback?
Yes, please. I think I don’t understand what you mean?
@Isaac_Owusu_Mensah
Why are you loading data inside train_mnist
?