(position, hid_idx)
| 229 | def get_sinusoid_encoding_table(n_position, d_hid, padding_idx=None): |
| 230 | |
| 231 | def cal_angle(position, hid_idx): |
| 232 | return position / np.power(10000, 2 * (hid_idx // 2) / d_hid) |
| 233 | |
| 234 | def get_posi_angle_vec(position): |
| 235 | return [cal_angle(position, hid_j) for hid_j in range(d_hid)] |
nothing calls this directly
no outgoing calls
no test coverage detected