Transformer Networks Exercise 1

Hi, I have been trying to solve exercise one and I get the following message.

I have tried multiple things and made sure I understand the operations I am performing, but I am unable to understand what I am getting wrong. Honestly the exercise does not seem very difficult at all (especially because of the hints), since the formula for calculating the angels is given above.

I cannot share code but I have done the two steps:
1: Transforming i so that if: k = [0, 1, 2, 3, 4, 5] then i = [0, 0, 1, 1, 2, 2]’
2: Implemented the formula for calculating the angle using i

Please click my name and share the relevant code via direct message.

Please fix the 1st parameter used inside np.power. It should not be 1000.