While grading my submission for the week 2 assignment for course 1, the grader is giving error message as “Can’t compile the student’s code. Error when checking input: expected dense_Dense1_input to have 2 dimensions, but got array with shape (None, 28, 28, 1)”.
I would appreciate any insights or suggestions on how to troubleshoot and resolve this issue effectively. Thank you for your assistance!
Hello @jenitta.jebaraj sir,
Thank you for your response,
The input shape that I have set for the first layer of the CNN is (28,28,1), are you prompting me to change this?
I have also provided the full error message earlier for your review.
I encountered The error message from the grader’s end after submitting the zip file containing the Model and its weights.
its been long since I did this course, so can you confirm as far as I remember some part of the codes were already given.
Notice your input shape is in array form (None, 28, 28, 1) but the expected form is to create a 2D array in Python, you can use nested lists . EX: array = [[1, 2], [3, 4], [5, 6]] . This involves creating a list within a list, where each inner list represents a row in the 2D array.
If possible please share your notebook via DM to @Jamal022, he is the current mentor for this course. he will surely reply. If he doesn’t, then let me know, I will have a look, but yes as @jenitta.jebaraj stated your input shape needs correction.
@Deepti_Prasad
Yes ma’am most of the code is already provided, we have to just code the architecture of the model and some preprocessing steps.
Thank you for your continued support. I will share my notebook with @Jamal022 as you suggested. I appreciate your attention to the input shape issue, and I’ll continue working on resolving it. If I encounter any further difficulties, I’ll be sure to reach out.
My apologies for the confusion @Deepti_Prasad ma’am.
In code, I ensured that the “inputShape” parameter is provided with the input in the list form [28,28,1], but while posting it I typed it in tuple format by mistake.
i find js far easier than python -models are writing themselves - Well i mean Laurence is really thorough i dont know how u could miss with the in depth explanations - im having issues with the set up - the first html went smoothly and iris classifier too - im sure my code is good here on this week 2 assigment but im getting webgl error codes from the chrome browser - brackets was never my editor so im not certain im getting the most out of it - im on a m2 apple silicon macbook pro - using Chrome with simple web server - but so far i dont get it past the front page commsnd option j keps giving me the web gl problem