Sequence models, week 4, assignment

{mentor edit: image of code removed}

I am having this error. why do odd and even columns have to be equal?

The reason is because that’s how the angles are defined for the position encoding.
It’s a little bit obscure in the lectures.
Search the Forum for “get_angles” and you’ll find a lot of threads about it.

1 Like

Also, I have edited your message to remove your code. That’s not allowed by the course Honor Code.

1 Like