It seems that I made no mistakes in this Assignment. The error is in Ex3. Please help me soon.
Thank you
Hi @khoa.nguyen311202 ,
I have technical problem in logging in to the Coursera platform, so I have no access to the course material at present.
However, looking at what you posted here, my suggestion is to refresh the kernel and clear all output, rerun the code from start.
The KeyError is showing no match for the key word âfunnyâ can be found.
Hi @Kic, thanks for your reply
I did what you suggested but the error still occurs. And is it strange that the KeyError is in Ex3 but the grader says itâs in Ex5?
Hi @khoa.nguyen311202 ,
As I mentioned I have no access to the course materials, so I am limited in what to help. I hope the technical problem with Coursera will be sorted out soon.
May be worth trying to refresh the kernel and clear all output, rerun code to ex3 and gradually running the code cell further down to see what happens.
I believe I have the similar issue as you. The part one is fine; but part 2 unit test canât run at all. I reloaded the whole thing, the issue is still there.
I just found a post about this. However, Iâm still unsure what to do
Hi @khoa.nguyen311202
& @swe
After reading that post on the KeyError(âfunnyâ), it suggests to check your code and make sure your implementation is correct. There is an âifâ statement in the code block, skipping it or implemented incorrectly would cause the error.
this is the error I am getting
Cell #14. Canât compile the studentâs code. Error: ValueError('operands could not be broadcast together with shapes (5,2) (5,) ',)
help please
Hi @Ebukliq ,
Could you give me the function name of that section of your code, cell number is not reliable to locate that section of the code as your copy of the notebook could be different from mine.
hi, I do not know the actual function. It all runs showing all test passed.
I get that error when i try to submit
Hi, @Ebukliq ,
Could you post the submission summary here. The summary would show which part of your code failed to get any marks.
We have no access to your notebook, nor your account.
this is the grader output:
Cell #14. Canât compile the studentâs code. Error: ValueError('operands could not be broadcast together with shapes (5,2) (5,) ',)
Hi @Ebukliq ,
Just giving me the cell number really doesnât help, as i have explained to you earlier.
I have no access to the assignment due to technical problem with the Coursera platform. So, I am afraid I canât offer any help. Could you create a new post with as much information as possible so that other mentors may be able to help.
Hi,
I tried it all. Tried to refresh the kernel, clear all output and rerun the code. Dinât work. Tried also gradually running the code after restarting the kernel and clearing outputs.None of them is working.
Showing the error as below always:
Cell #14. Canât compile the studentâs code. Error: ValueError(âshapes (5,2) and (50,) not aligned: 2 (dim 1) != 50 (dim 0)â,)
Hi @Ebukliq @Farija ,
I change my code in Exercise 1 - sentence_to_avg
from:
avg = np.zeros(np.shape(word_to_vec_map))
to:
avg = np.zeros(word_to_vec_map[any_word].shape)
and It passed the assignment.
Hi @coco ,
Yes. I tried that and it worked. Thank you for the suggestion!
Thanx. It helped me.
thanks. this helped me.
I got exactly the same error due to a small error in scored function sentences_to_indices
. So I suggest do check this function.
For me, hereâs my typo and what I changed:
I changed from if w in sentence_words:
to if w in word_to_index:
.
Yes, you are right Yufeng Deng.