We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 41a96b6 commit 001b36dCopy full SHA for 001b36d
attn_gym/masks/natten.py
@@ -66,9 +66,9 @@ def get_x_y_tiled(idx: IntTensor) -> Tuple[IntTensor, IntTensor]:
66
Map 1-D index to 2-D coordinates for static tiles of T_H x T_W.
67
"""
68
t_id = idx // (T_H * T_W)
69
- t_x, t_y = t_id // (W // T_W), t_id % (W // T_W)
+ t_y, t_x = t_id // (W // T_W), t_id % (W // T_W)
70
t_offset = idx % (T_H * T_W)
71
- i_x, i_y = t_offset // T_W, t_offset % T_W
+ i_y, i_x = t_offset // T_W, t_offset % T_W
72
return t_x * T_W + i_x, t_y * T_H + i_y
73
74
def tiled_natten_mask(
0 commit comments