i have been stuck with the for the past 4 hr. now , don’t know what’s wrong the code give result in google Colab but wont pass on the grader.
Please Rely fast i am on a tight schedule.
Hi @Durgance_Gaur,
can you send your code?
C2_W4_Assignment_(2) (9).ipynb (47.9 KB)
I think you should take a look at the units in the last Dense layer. 25 doesn’t make sense, to me.
Thank for the remark i was just testing around 25,24,26. will check that part but still can u please help me, i dont understand what is this line 14 this program keeps talking about
I suggest you to first change this units in the last layer accordingly and then check if you get other errors, and in that case send me a screenshot of the error.
i used unique label from training data as the input of the last layer but the output in the grader is still the same
- fit_generator is deprecated, use fit
- write the number (suggestion, not 25)
i have now used [26,27,28] as the number and changed it to fit
C2_W4_Assignment_(2) (15).ipynb (33.9 KB)
but still its keeps giving me parsing error…
why is it saying invalid syntax even though it works on my colab.
I really appreciate you helping me.
Thank you
Don’t worry, piece by piece we’ll fix it. Next, your model is trained for 2 epochs with a micro learning rate, so basically it doesn’t learn anything: change
optimizer=‘adam’ (with default learning rate)
and try with more epochs, like 5, or more
Probably your error is something different, but right now, your model doesn’t reach the accuracy requested.
This time is used 15 epochs and changed the optimizer to the default.
but my evaluation accuracy is much higher than the asked one what should i do
Sorry @Durgance_Gaur ,
it appears that the Coursera labs are still wanting fit_generator (that as I told you is currently deprecated). So please, put back fit_generator.
Hope it helps
but i dont understand what is this parsing syntax error it keeps popping up pls help
I tried submitting your code with the modifications we discussed about and I actually passed it. It seems you have a syntax error, but you told me you execute every cell with no mistake, and the shapes are as requested. Can you try using the Coursera platform, instead than Google Colab?
Thank you ! i don’t why this happened i just pasted my code in the coursera platform it was passed in the first time . This google colab issue took my whole day.
This was very irritating but thank you for helping me…
Great. Sometimes these things just happen. Glad to be of any help. Happy learning.