Before I give you the debug of your assignment, I’d like to point out a few things.
1 - Every assignment includes exercises. And for each exercise, there could be one or multiple unit tests to check the implementation. More unit tests for an exercise would mean it would check if your implementation is correct with different inputs and/or different aspects of your implementation.
2 - In order to “pass” your exercise, you need to “pass” all of the unit tests. Even if one unit test fails, you will not get a grade for your exercise.
3 - The autograder for the assignment runs from top to bottom. If it encounters an issue which would terminate its execution, you would not be given a partial or 0 grade. You encountered a runtime error, trying to perform an operation that is not supported, which is why you didn’t get the partial grade.
4 - Assignment and the autograder are two separate things (separate and different tests). Just because something worked in the assignment, doesn’t mean it would work in the autograder as well. This usually happens when learners try to hard-code their solution. Like in your case, the error you get in the assignment is about wrong output, but the autograder is giving a different error, because its execution is different.
5 - You are only expected to change the code in the assignment where you are asked, no where else. You should not also update or install any extra packages in the environment of the assignment, as it may work in the assignment, but might fail for the autograder.
Now, as for issue in your assignment, keeping (5) in mind, you had changed code. Particularly in the unit test cell of Ex 3. You started another keras session, which you are not supposed to.
And since you got an error in the assignment, the code didn’t run all the way through, which is why you got an error from the grader as well. Fix the code in the assignment and all should be good.