Issue with UNQ_C4

Hi,

I think there might be an issue with w2_tests.test_compute_attention_output_closure or I did some mistake I can’t find.

Both test cases are using same x variable but n_heads and d_head variables are different, consequentially I’m getting InconclusiveDimensionOperation: Cannot divide evenly the sizes of shapes (6, 2, 3) and (2, 3, 2, 2) since d_head is 2 but actual last dimension of x is 3.

I’ve tried to use x.shape[2] instead of d_head but in this case the test case fails with wrong result error.

Thanks,
Pavel

Hi @pavelkuchin,

Can you share your lab ID with me ? In the assignment, when you click the top right “Help” button, a panel will open and your lab ID will be shown at the bottom.

I shall take a look.

When you reply back, kindly tag me in the post so that I’m notified.

Thanks,
Mubsi

Hi @Mubsi,

Thank you for looking into it! I’ve just shared my lab ID in private message.

Thanks,
Pavel

Hey @Mubsi

Could you please help me with this too? I am facing the same issue in UNQ_C4.

My lab id is - eeqfgndb

Hi @Srishti_Verma & @pavelkuchin,

I’m unable to help at the moment. In the meanwhile, make sure you are following all of the instructions provided in the notebook appropriately.

Best,
Mubsi

Hey @Mubsi,

Can you confirm it’s a bug? or is it just our mistake somewhere?

Thanks,
Pavel

Hi everyone!
I am getting the same error. @pavelkuchin and @Srishti_Verma: Have you found a solution for this problem?

Thanks,
Viktoria

:slight_smile: Solved my problem: I had the first reshape in C4 wrong. - Now it works.

@ Viktoria_S, How did you fixed it?

@gowestyang , I had to do the following for the first reshape in C4, which solved the problem:

Reshape x using jnp.reshape() to shape (n_batch, n_heads, seqlen, d_head)
(code snippet removed)

2 Likes

Thanks @Viktoria_S !
How could I miss it :rofl: