W2 assignment_ "classes[..]"

Hi,

I have a small question.
In the beginning of the assignment, we have this piece of code:
classes[np.squeeze(train_set_y[:,index])].decode(“utf-8”) + “’ picture.”

I am perplexed by it…( What is it - “classes”? some built-in information?

Thank you in advance.

Yes, it is from the “h5” file that contains the input dataset. If you want to understand in more detail, you can find the source for the load_dataset routine by clicking “File → Open” and then opening the appropriate python utility file. There is a topic about how to do that on the FAQ Thread.

i am unable to solve assignment can you help me

Sure, we are here to help. But just saying “I have a problem” is not a useful way to get help. Please give us something more specific. Which section are you having trouble with? What is the error that you are getting? If you just say “I can’t solve it”, then where are we supposed to start?

As context, please realize that the mentors are just fellow students: we do not have the “magic power” to look at your notebooks or what your grades are or anything else about your account.

Also the best thing is to start a new thread that is specific to your problem, instead of tagging onto a thread about some unrelated topic. Or if you’re a new user and Discourse won’t let you create a new thread (that happens for very new users), please try to find another thread that is about the same section of the exercise that you are having trouble with.

i cant solve it. please give solutions

Sorry, but that’s not the way things work here. There are no official solutions. And if I gave you the answer and you used that to pass the assignment, that would be cheating according to the course rules. See the Honor Code in Week 2.

Did you actually read what I said in my earlier replies? If you want help, you need to ask a specific question. You haven’t even told us where your problem is. Pick the first function on which you are having trouble and ask a specific question about that. What is going wrong? Do you get an error message or just the wrong answer? If you take a look around the forums, you’ll get an idea for how this works.