I am stuck with the following error

ValueError Traceback (most recent call last)

in

29

30

—> 31 positional_encoding_test(positional_encoding)

in positional_encoding_test(target)

4 d_model = 16

5

----> 6 pos_encoding = target(position, d_model)

7 sin_part = pos_encoding[:, :, 0::2]

8 cos_part = pos_encoding[:, :, 1::2]

in positional_encoding(positions, d)

20

21 # apply sin to even indices in the array; 2i

—> 22 angle_rads[:, 0::2] = np.sin(get_angles(positions, dims, d))

23

24 # apply cos to odd indices in the array; 2i+1

ValueError: could not broadcast input array from shape (1,16) into shape (8,8)