C2W4 Assignment - Expected: typing.Callable, but got: <class 'NoneType'>

I am working on the Week 4 assignment for the convolutional neural networks course. I have the entire assignment operational with accuracy at >99% accuracy. I have checked many of the other threads and I have not made of the other suggested mistakes, as far as I can tell. No One_Hot labels, “Parse_cat…” etc. However, I still seem to get errors on grading. I’m not sure why.

Details of failed tests for parse_data_from_input

Failed test case: parse_data_from_input has incorrect type.
Expected:
typing.Callable,
but got:
<class 'NoneType'>.


Details of failed tests for train_val_generators

Failed test case: train_val_generators has incorrect type.
Expected:
typing.Callable,
but got:
<class 'NoneType'>.


Details of failed tests for create_model

Failed test case: create_model has incorrect type.
Expected:
typing.Callable,
but got:
<class 'NoneType'>.

Thanks for the help.

Hey there @jblakie ,

Double-check your function definitions and make sure that they all return the appropriate values. If your functions are correctly defined and returning the expected outputs, they should be recognized as callable, and you should pass the grading tests.

I hope this helps! If you need further assistance, feel free to ask.

Alireza,

As far as I can tell everything is returning correctly and in the right form. All intermediary expected outputs are identical to the course instructions. All functions have valid returns that are in turn used properly by the calling code.

I have >99% accuracy in like only 5 epochs. Everything is working correctly.

So, not sure where the grader thinks the problem is.

Thanks.

John

First, you said you are working on a convolutional neural networks course (C4) but your title says C2. Please correct that. Also, week 4 of course 4 has two assignments. Please specify which one you are doing.

Regarding your error, please replace all the None with your code where it is specified to do so.

Hey again,

I’m assuming your code is completely fine. Here are a couple of steps you can try to resolve the issue:

First, make sure you have the latest version of the notebook by pushing the end date of your schedule!

If that didn’t work, backup your answers and then revert your notebook to the latest version from Revert to Checkpoints section and rewrite your code in the updated notebook.

Let me know if you need further assistance!

Sorry if I misunderstood the lingo, but I am talking about Course 2 Week 4 for the Convolutional Neural Network course for the Tensor Flow Developer Certificate Course. There is only 1 assignment for this course, that is why I did not state whic assignment.

As for the second piece. I have replaced all “None” pieces in the assignment. My code is working perfectly with 99.9% accuracy. I still do not understand why the grader is generating the error messages, when the execution engine is not.

I have sent my code to Alireza and he has been responding off thread.

Thanks.

John

1 Like

Alireza,

Thanks for the helped. I opened a new notebook and copied my code into it. It passed with 100%. After doing a diff, the only difference was a model.summary() call that was used during troubleshooting. I’m not sure why the auotgrader does not like that call.

But Thanks.

John

I am glad that you resolved your issue. And thanks for moving your post from Deep Learning Specialization–> Convolutional Neural Networks to TensorFlow Developer Professional–> Convolutional Neural Networks in TensorFlow.

1 Like

Good to hear that! Happy to help :raised_hands: