Cannot Pass C1_W4 Assignment

Hi, after completing the code (which I am pretty sure is correct at this point) and then several attempts at training my model on the browser going up to 100 images for each sample category, I still cannot pass the autograder. I am continuously getting a model with bad accuracy and this result: “Your model has NOT passed the required level of accuracy on the test set. The minimum required accuracy is 0.6600. Please try again.”. I have continuously tried multiple times now. I am not sure what is going wrong.

1 Like

It would help if you summarize what combinations you have tried.

1 Like

Hi TMosh, thanks for you quick reply, by combinations do you mean sample sizes? If so, I tried 30 - 40 images, 50 - 60 images, 80 - 100 images, 100 - 120 images for each category: Rock, Paper, Scissor, Lizard, Spock.

1 Like

I’m not very familiar with this assignment (I’m not a mentor for this course). Are there other model parameters you were asked to vary?

1 Like

The assignment was mainly adding a case in the switch statements for the extra class of “Lizard”. The code to create the model was the same as the ungraded lab that was provided.

1 Like

OK. Hopefully a mentor for that course will contribute a reply.

Hello ishan,

The assignment requires you to takes 50images per hand signs, I hope you have taken as per the instructions?

Also I am tagging @Jamal022 mentor for this course.

If you are stuck let us know. You only need to make sure your codes assigning should be correct as you refer the ungraded lab it only mentions 3 category, but the assignment asks for 4 category. So hope you have followed as per the instructions.

Hey @Jamal022 :wave:

You are required here.

Regards
DP

1 Like

Hi Deepti,

I took 50 images per hand sign but it still did not work. I mentioned the ungraded lab as the instructions to create the model were very similar, the only difference was that the output Dense layer had 5 units for the 5 different hand signs. I am still stuck on this and cannot pass the accuracy issue.

Ishan,

Are you able to run the assignment on the chrome browser? Are there any error log?

Please send your notebook via personal DM let me have look by then.

Don’t worry, even I was stuck in this assignment but a Goodfella guided me through @Honza_Zbirovsky

You will clear, share your notebook. Click on my name, then message. Do not post any codes here.

Regards
DP

Thank you, @Deepti_Prasad, for bringing this to my attention.

Hello, @Ishan_Dane,

As mentioned by DP, it’s important to capture around 50 images for each hand sign. However, ensure that you vary the hand’s position within the frame to capture a diverse set of images.

For instance, experiment with zooming in and out or moving your hand to different edges of the frame. Continuously change your hand’s position to capture various shapes. Avoid keeping your hand in a fixed position; instead, move it around as you expand and enhance your dataset.

Let me know if your problem still not solved
Regards,
Jamal

Ishan,

can you share the screenshot of the result you got?

I checked your notebook. your codes are fine. only next thing, I would advise you is first delete the browsing history and cache history, log out from your coursera id once, then log in and try again the model by taking the images again. but make sure only to take only 50 images each for each sample.

Try this once, and let me know if doing this resolves your issue.

Regards
DP

Hi All,

I just did all the things you mentioned and resubmitted but still got the same accuracy problem.

Did you take fresh images, or trained the model on the previous images?

Also can you please share the screenshot of your accuracy results with the message it shows where it tells why you didn’t pass the grader?

It’s better usually to delete the whole assignment file from your folder or local drive, and again redownload that folder and redo the assignment from scratch, from place the folder in your local drive to writing the codes and taking news images.

Also making sure like how Jamal said to make take a clear pic of hand signs. Infact when I did the assignment there was 1-2 hand sign mixed up but I made sure to take the hand sign with the whole palm.

As the model might be still taking your previous images

Regards
DP

I used fresh images that I retook. Here is the message from the autograder. I took pictures for each hand signal from all the angles Jamal referred to but I still got the same problem.

Ishan,

Can I know if you took images for the other two hand signs too??50 images each for lizard and spock samples?

The accuracy was not achieved may be due to reason of test set being not enough to match the expected accuracy.

Can you share the screenshot of hand sign image you used for Spock and lizard samples? as your grader output tells you almost got the result, so it can be related to taking the images correctly and equally for all 5 samples.

Hi all,

Yes I did 50 images for lizard and spock samples too. I just tried again and had the same problem occur. I am just taking my pictures like instructed. Im losing hope in being able to pass this assignment.

Hey @Ishan_Dane,

Did you take the pics in the way i told you? Just think as in data augmentation when you apply zooming and rotating and so on but in this case you gonna do that manually using your hand and it’s okay to take more than 50 image and give it a try.

In machine learning it’s an iterative process we give a try and try to experiment again to enhance don’t give up that easily be patient and go on try again take pics as i told you and keep in mind augmentation process and try more than 50 image per class.

hello Ishan are you there?

Can you please share a image for these samples you have taken.

You can delete afterwards if you want. and you will pass this assignment. there are two mentors here until you clear the assignment.

Ishan I just upload your assignment on my browser, looks like there are less number of image samples taken, please follow the instructions one by one, and if you can share one of the image for each samples you have taken here.

re-uploading the same model will result you in the same grader accuracy.

Regards
DP

Hi all,

I finally passed the assignment. I took 150 images in total for each class and increased my number of dense layers and hidden units. I also used rotations as advised to act as augmentation in my data. Thanks Deepti and Jamal for helping me out on this. I was very close to giving up but you guys convinced me otherwise.

Hello, after only one successful attempt to submit the solution and failed with the same reason, the program crashes on both of my laptops and on different browsers. Here is a portion of the error message that i am keep getting

tfjs@latest:17 Uncaught Error: Failed to compile fragment shader.
at VIe (tfjs@latest:17:1087430)
at aSe (tfjs@latest:17:1146462)
at tfjs@latest:17:1201609
at s.value (tfjs@latest:17:1202459)
at s.value (tfjs@latest:17:1201571)
at fAe (tfjs@latest:17:1275305)
at Object.dAe [as kernelFunc] (tfjs@latest:17:1276131)
at n (tfjs@latest:17:222081)
at tfjs@latest:17:223012
at e.value (tfjs@latest:17:220344)