I implemented pos/(10000**((2*i)/d)) as said in the instruction. I got following assertion error.

in

20 print("\033[92mAll tests passed")

21

—> 22 get_angles_test(get_angles)

23

24 # Example

in get_angles_test(target)

14 even_cols = result[:, 0::2]

15 odd_cols = result[:, 1::2]

—> 16 assert np.all(even_cols == odd_cols), “Submatrices of odd and even columns must be equal”

17 limit = (position - 1) / np.power(10000,14.0/16.0)

18 assert np.isclose(result[position - 1, d_model -1], limit ), f"Last value must be {limit}"

AssertionError: Submatrices of odd and even columns must be equal

I don’t know the reason.

please help me.