I have been trying to resolve the problem with course 5 week 2 programming assignment 3(Emojify). However I am just not able to figure out the error. I had passed all test cases before the submission but after submission, it was showing some error and the assignment was not graded properly.
It appears that your code has an error that was not caught by the unit tests.
{edited}
I’m having a very similar problem
Cell #13. Can't compile the student's code. Error: ValueError('operands could not be broadcast together with shapes (5,2) (5,) ',)
The code in my model creation looks like this
{moderator edit: code removed}
Note that posting your code isn’t allowed by the course code of conduct. I’ll delete it from the thread after I take a look. Normally you would only post your code to a mentor via a direct message if we specifically ask you to.
Not to worry, as this is your first post on the forum.
Stand by while I take a look…
The first comment is that the notebook has a sentence_to_avg() function, that’s what you’re supposed to use here.
Also, why do you feel that the error is in the model() function?
The error message occurs on cell 13 which is the one defining model. I figured that must be where it’s happening.
Sorry about the faux-pas concerning code posts
Switching the code to using the sentence_to_avg
function seems to have fixed the problem.
Thanks for the help!