Deep Learning Specialization C5W2A2E2

Within the Deep Learning Specialization

  • Course 5 Sequence Models
  • Week 5 NLP and Word embeddings
  • Coding Assignment 2
  • Exercise 2 model:

Within the Graded Function code, it states: “Y – label, numpy array of integers between 0 and 7, numpy array of shape (m, 1)”. I guess the array of integers goes from 0 to 4, and not 7.

Regards, Carlos

Hi, Carlos.

Yes, you are correct. In the instructions and the sample data, they have 5 available emojis. But notice in the test case for the model function, the data actually has only 2 possible label values. The code is written to be general and not dependent on the actual number of emojis, so I’d say it’s a mistake for them to make the docstring info hard-coded in that way even if they hard-coded it to the actual number. :nerd_face:

I’ll file a bug and suggest they change the wording there to be more general.

Thanks for pointing this out!

Regards,
Paul