DLS C4W2 Assignment 2: All tests cleared but grader shows zero

The error is as follows

Error: ValueError(“Attempt to convert a value (<tensorflow.python.keras.engine.functional.Functional object at 0x7fcde80969d0>) with an unsupported type (<class ‘tensorflow.python.keras.engine.functional.Functional’>) to a Tensor.”)

I suggest you try this sequence:

  1. Kernel → Restart and Clear Output
  2. Cell → Run All

Then scan all the way through the notebook carefully and make sure that there are no cells that throw any errors. If all looks good, then do:

  1. Save
  2. Submit to the grader

A couple of things to note:

  1. Just typing new code in a cell does nothing until you click “Shift - Enter” to execute that cell and get the changes incorporated into the runtime code image.
  2. When you click “Submit” to the grader, it does not do an automatic “Save” for you. So one possibility is that the grader is running an older version of the code.
  3. If you are working in a renamed copy of the assignment, clicking “Submit” grades the “official” notebook (the one opened by the “Work in Browser” link). So that’s another way that the grader can see different code than you are seeing.

I tried everything that you mentioned. The output is still the same

Ok, please check your DMs for a message from me.