C5_W4_A1_Transformer_Subclass_v1 Exercise 5

I don’t get why I keep getting the error:

AssertionError: Wrong shape. We expected (2, 3, 4)

Can someone please give me a hint?

One of your variables has the wrong shape.

Could it possibly be here?

x += self.pos_encoding[:, :seq_len, :]

I’ve trying for some hours but don’t find another lines where I suspect there could a wrong shape… Thank you!