Yeah sorry for the typo. The t_n is missing indeed!
I think you are referring to the docs which states:

Must be a vector with length equal to the number of classes.

Now I understand the issue and am confused as well, as I thought a scalar tensor would work, e.h. pos_weight = num_neg / num_pos. Thanks for digging deeper!
CC @velikodniy who implemented this. Am I misunderstanding the usage of pos_weight?