Convolutional_model failed test case

I’ve been doing my project for the 3rd week, i got 23/34 for convolutional model cause I have 10 epochs as you can see from this picture.

what’s wrong from it? what should i do to get less than 10 epochs as expected?
please, anyone could tell me why

Could you please click on my name and send me your notebook?

Thanks! :smile:

Hello @Rifah_Maulidya,

At the top of this notebook, Instruction was given :

You should stop training once the accuracy goes above this amount. It should happen in less than 10 epochs, so it's ok to hard code the number of epochs for training, but your training must end once it hits the above metric. If it doesn't, then you'll need to redesign your callback.

When 99.5% accuracy has been hit, you should print out the string "Reached 99.5% accuracy so cancelling training!"

The error seems to be here. Have you written a code snippet for cancelling training when reached 99.5% accuracy? because training will be done in less than 10 epochs.

If you have done it and still got error, feel free to send me or any other mentor your notebook via dm. By clicking on my profile picture, you will see an option to message. There you can attach your notebook.

Then we can discuss the issues here, under the topic you created, on discourse.

With regards,
Nilosree Sengupta

Hey @Rifah_Maulidya!

After reviewing your notebook, it looks like you didn’t define a callback in the # GRADED CLASS: myCallback code block!

I would suggest replacing pass` in following snippet with your callback to stop the model when it reaches the desired accuracy!

# Define the method that checks the accuracy at the end of each epoch
pass

Hopefully this helps, and if you need any assistance with defining the callback - I’d be happy to help further!

I’ve replaced pass in the snippet and just reached for an epoch with 0,9564 accuracies. In contrast, it doesn’t like as expected to reach 99,5%. When I sent it to an automatic grader I got 89/100 :frowning:

If you could send me your updated notebook - that would be great!

Hey @Rifah_Maulidya,

It looks like your callback has the logic:

if(logs.get('accuracy') < 0.996):

What that means is that it will stop the training if the accuracy is less than 0.996.

Now we want the training to stop when the model reaches, or is greater than 0.995.

How might you change your logic to reflect that?

1 Like

I’ve changed the code for that snippet and thanks to God finally I reached 100 points :blush:
Thank you for your help and the guidance…

1 Like