I’m a bit confused about the C2W4 assignment. Since we’re not using flow_from_directory
, it sure seems like we need to one-hot-encode the labels, but the assignment makes no suggestion to do that, and the “hand-holdy” nature of the instruction on previous assignments has me leaning on the side of uncertainty given the absence of explicit direction to produce a one-hot encoding. Are we using a different technique? Have I missed something?
Furthermore, the Expected Output from the cell where we ingest the .csv
says training labels shape should be (N,)
, not (N, 26)
. But a one-hot encoding classifier would be (N, 26)
– edit –
oh, wait, maybe it’s argmax
.
TIL about the difference between
[code removed - moderator]
How did you resolve this? Sorry, I don’t understand your solution. I was able the resolve the error by using ‘sparse_catgeorical_crossentropy’ instead of ‘categorical_crossentropy’ but my loss is nan and accuracy is around 0.4. Enough to pass the assignment but not to achieve the suggested accuracy of >0.9 at the bottom of the assignment.
Hello @Manik_Garg ,
Welcome to the Community!!
It seems you have already cleared the error discussed over here.
Could you kindly create a separate topic stating the particular issue you are stuck with now.
With regards,
Nilosree Sengupta
Thanks @nilosreesengupta ! I noticed someone posted an idea in another thread and I will try implementing that, just in case it works. I assume we can’t paste our exact code to get help? Is that why @Ian_Ray 's solution says: [code removed - moderator]? Thanks again!
Hello @Manik_Garg ,
Yeah, as per the community guidelines, learners are not supposed to post code solutions or their notebooks publicly on community.Learners can create topics or posts discussing about errors or screenshots of errors or copy pasting errors.
Then, to understand the specific problem of learner, if needed, mentors ask the learners to send their notebook personally via direct message.Then mentors and learners can explain and discuss about it on community.
Hence code solutions/notebook can only be shared with mentors and staffs of Deeplearning.AI privately via dm.
With regards,
Nilosree Sengupta
Hello @Manik_Garg
Is your issue solved?
With regards,
Nilosree Sengupta