C3W1 Problem with UNQ_C6

Hello,

I was able to train the model but during training loop validation faced following error:


2022-09-04T18:30:00Z

The evaluation cell is passing eval_task as list and in training loop, eval_tasks argument takes a evaluation class list object. That’s why passed it directly. Do I need to change anything in my code?

Thanks in advance!

Here your error is "Incompatible shapes (16, 13) and (15, 2). What it probably means, that you made a mistake in previous exercises (most probably Exercise 02 with data_generator function or less likely with with Exercise 4 with Dense layer. Please check if you pass your tests for these exercises.

Hello,

Previous exercises passed all test cases. Not sure what can cause this.

Hi @Siddhartha_Roy_Nandi

If you still cannot find a mistake, you can private message me your notebook, I will look into it.

Hi @arvyzukai , I have private messaged and shared the notebook with you.

Thanks

Hi @Siddhartha_Roy_Nandi

You forgot to pass an axis for the tl.Mean() layer in UNQ C5, that is the reason you get Incompatible shapes error.

tl.Mean: Calculates means across an axis. In this case, please choose axis = 1 to get an average embedding vector (an embedding vector that is an average of all words in the vocabulary).

P.S. Please remove solution code image from first post. Thank You.

3 Likes

Thanks @arvyzukai . It worked. I was able to submit the assignment successfully. I tried to delete the snapshot. It seems like I can’t modify a post when it’s a start of a thread. Neither can delete it because of permission. If you have permission please delete the snapshot. Thank you again for the help!

No problem. I removed it for you.

Cheers

I had the same issue. I had used the incorrect axis to calculate the mean. It might be helpful if this was caught by the unit test.

Thanks.