Week 2: Emojify

In the notebook all code runs and passes unit testing, but on submission an error is thrown:

Cell #13. Can’t compile the student’s code. Error: ValueError(‘shapes (5,2) and (1,) not aligned: 2 (dim 1) != 1 (dim 0)’,)

Does cell 13 refer to programming cells or markdown cells? Or is this an autograder problem?

I think it’s an error in your code that the unit tests don’t catch. The cell numbers are the code cells from your notebook, but the data sizes are from the unit test the grader uses.

What code is in your 13th cell? You can post it here and I’ll delete it later - as long as you post it in the next 10 hours - after that I’ll be off the course for several days.

1 Like

I believe cell 13 contains:

np.random.seed(1)
pred, W, b = model(X_train, Y_train, word_to_vec_map)
print(pred)

Although this is vague as I’m only counting cells that contain python code.

That line is going to throw an error on any problem in your model. So it’s not too useful for diagnosis.

I am mostly offline for the next few days. Maybe another mentor will answer further.

Hey @gkeating,
As @TMosh mentioned, this line could give error on any problem in your model. So, can you please DM me your code for the model function, so that I can try to find if any error exists. Make sure to not post it here, since it is against the community guidelines.

Regards,
Elemento