Deeplearning Speacialization Course 5 , week 2- Problem in Emojify assignment

@Kic pls respond, have been stuck for ages

Hi @joshianirudh ,

Each of these tests is testing for different thing. In the case where the assertion is triggered, it is because the ‘avg’ does not equal [1.25,2.5] element wise within a tolerance level.

So going back to my earlier reply, the problem lies within the ‘if’ statement, where your code is checking the word in the wrong place. The correct way is:

if w in word_to_vec_map

1 Like

pls make these changes in the main code for the future

@joshianirudh ,

What do you mean by ‘make these changes in the main code for the future’? That section of the code enclosed by ‘START CODE HERE’ and ‘END CODE HERE’ is your work. Have you not realised you have to implement that section of code?

If you pay attention to the notes and comments in this cell, you would have sorted out this problem long ago especially after I pointed that out to you in my earlier reply.
We are here to support your learning, but the work and the learning have to be done by yourself.
All the mentors here are volunteers, we don’t get paid to help the students.

1 Like

@Kic and @TMosh : I DM to you and deleting my code here. Please help me to resolve this

Thanks in advance

Please do not DM the mentors unless we ask to see your code.

Hi,

I am sorry to disturb you…Will keep this in mind.

Thanks

I’m a bit confused because the output of word_to_vec_map[any_word] is a list and word_to_vec_map[any_word].shape throws an error… so i’ve been trying for some good amount of time to figure out what’s happening. The error looked like it was propagating all the way in one of your utils. Then I restarted the Kernel and it’s working… What is happening???

The notebooks rely on a lot of global variables.
If you run the cells out-of-sequence, you can get unintended errors.

Restarting the kernel and re-running all of the cells will straighten out many potential issues.

I have the same error. How did you the issue please?

It would be better to start a new post and share your full error with the proper week and assignment number. Many things changed in an assignment in two years.