Failing to submit C4W2_Assignment_2

I am pretty sure my solution is correct, it is passing both locally in pycharm and remotely when running the notebook cells,

yet when I “submit” the assigment, it takes a very long time to complete and always fails with 33/99.

Obviously, I cannot post my complete solution here but what can I do?

As you can see in this screenshot the notebook runs fine, yet the grading fails.

Did you download the notebook to pycharm and then re-upload it back to the DLAI Learning Platform? In general that is a risky thing to do because different tools and environments deal with the JSON source code for the notebooks differently. For example, we have seen examples in which running a DLAI notebook on Colab and then reuploading it to Coursera or DLAI will cause failures.

The graphs you show do look slightly different than what I got, but are pretty similar. It’s possible that there is something different in your code. As you say, we can’t share that in public, but check your DMs for a message from me about how to proceed.

no, I didn’t, I only copy pasted the graded solutions from my local notebook to the remote notebook

Just the lines of code, or the entire cell?

the entire cell, I will try to start from scratch

Pasting the entire cell is not a good idea. You may Refresh Your Workspace and then just paste the solution code from your local files between ### START CODE ### and ### END CODE ###.

@saifkhanengr I refreshd my workspace as you suggested, pasting only the code between #START and #END and I again had the same result (33/99)

To close the loop on the public thread, this is a classic “hard-coding” error. The input shape in the alpaca_model logic was hard-wired to IMG_SHAPE, which happens to agree with the test cases in the notebook, but the grader must pass a different value for that parameter in its test cases for alpaca_model.