C1_W4 assignment failed

Yesterday I finished C1_W4 assignment with “Rock, Paper, Scissors, Lizard, Spock”. In browser everything works like a charm, but during submission I receive following message:

“Can’t compile the student’s code. Error when checking input: expected flatten_Flatten1_input to have shape (7, 7, 256) but got array with shape (7, 7, 1024)”

… and thereof I didn’t pass.

When I checked the size of ‘conv_pw_13_relu’ it’s (7, 7, 1024). Does anyone know why (7, 7, 256) is expected to pass this exercise, please? Did I miss something here?

Any help is highly appreciated. Thanks a lot in advance!

Honza

1 Like

So, I downloaded the data once again from GitHub and made that completely from scratch. Now I passed :roll_eyes:. When I compare the older and newer version I see no difference… So I still don’t know, what was wrong.

1 Like

I had a similar error to this when I did week 2 assignment. Same code, different array shape. I think it’s some JavaScript semantics that we don’t get

Thank you Honza for raising this. I faced exactly the same error message “expected flatten_Flatten1_input to have shape (7, 7, 256) but got array with shape (7, 7, 1024)”. Somehow, it solved by trying the same code with newly downloaded files from git. Your report helped me a lot.

1 Like

I’m glad it helped!

PS: Welcome to the Community :wink:

Hello Honza,

I am trying to the same assignment,

but I am getting this message when I try to run in the browser

One or more documents in this page is in Quirks Mode, which will render the affected document(s) with quirks incompatible with the current HTML and CSS specifications.

Quirks Mode exists mostly due to historical reasons. If this is not intentional, you can add or modify the DOCTYPE to be <!DOCTYPE html> to render the page in No Quirks Mode.

Can you please guide me!!!

Regards
DP

Hi @Deepti_Prasad.

Please, could you share what’s your current set up (browser, web server you use, etc.)? In the time I did it, I used Chrome browser with the “Web Server for Chrome” extension. Please remember that the “Web Server for Chrome” extension is no longer supported (I think since June 2023 or something like this), so you have to use another alternative. I can try to download this assignment once more and try to do it again. Thx.

BR Honza

Thank you Honza, I was hoping you see my post as I saw you doing the same assignment and getting the solution. Yes I am aware of the web server for chrome no longer supported. So Chris favila had done some workup and made an updated for week 3 assignment to use Coursera web environment as it required tensor flow 2.2

But in this exercise I think I am able to do the coding part but when I am change the tensor flow script to list/min.js according to post thread, for this assignment I am still running into error. Based on the video shown, what I believe once you compile the code, on the developer tool your cam should be seen but for me it is not. Is it because I am using a MacBook?

I am using Chrome browser for this assignment.

Thank you so much for trying this assignment again, I hope this isn’t trouble for you. or I should again ping Chris.favila. I already have troubled him a lot for this course :smile:

I am tagging you to a post I created where I have shared screenshot of the error I am facing. Please have a look there.

Regards
DP

Hi @Deepti_Prasad.

So, I did that completely from scratch again and you just need to do following:

  1. Download Brackets in the latest version and have Chrome browser installed (obviously the latest version).
  2. Clone original repo from here
  3. Enter the missing code
  4. Run “rpsls.html” in Brackets by clicking the top right button
    image
  5. Enter samples for all 5 categories
  6. Train the model (I didn’t do any special tuning, so don’t worry about the loss size, but it’s still pretty good :slight_smile: )
    image
  7. Download the model
    image
  8. Submission

Please let me know, if it works for you.
Greeting from the heart of Europe (=Czech republic :slight_smile: )!

Honza

1 Like

Hello Honza,

I already did steps till 6 which is where I am stuck, please look the post I have tagged you for the error I am coming across.

Regards
DP

@Deepti_Prasad I checked the thread. I don’t have Mac and I don’t know, if this could be computer related issue. One idea could be, if you are willing to share your code with me in a private message, I can run it on my computer to test it (otherwise it’s pretty difficult for me to reproduce your errors). Based on the result we can plan next steps. Let me know. Thx.

I have messaged you my notebook assignment