C5_W4_A1_Transformer_Subclass_v1 - 1.2 - Sine and Cosine Positional Encodings

Hi,

i print the UNIT TEST parameters:

position: 4
pos_encoding.shape: (1, 4, 16)

but the test fails with:

AssertionError: Wrong shape. We expected: (1, 8, 16)

If i force the number of position to double it tells me:

position: 4
pos_encoding.shape: (1, 8, 16)
All tests passed

Doesn’t sound correct to me, if we have a phrase with 4 words… why to double the positions?

damn variables… position instead of positions!!!

sorry guys my fault

1 Like

I too did the same mistake and was trying to debug for half an hour, Glad i saw this post, Thank You