Skip to content

Commit

Permalink
impl: set indexing=ij to avoid warning
Browse files Browse the repository at this point in the history
  • Loading branch information
haku-huang committed Feb 19, 2024
1 parent d593f06 commit d7b4600
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions ptlflow/models/flowformer/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@ def compute_weight(hws, image_shape, patch_size, sigma=1.0, wtype="gaussian", de
h, w = torch.meshgrid(
torch.arange(patch_size[0], device=device),
torch.arange(patch_size[1], device=device),
indexing='ij',
)
h, w = h / float(patch_size[0]), w / float(patch_size[1])
c_h, c_w = 0.5, 0.5
Expand Down
1 change: 1 addition & 0 deletions ptlflow/models/flowformerplusplus/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@ def compute_weight(hws, image_shape, patch_size, sigma=1.0, wtype="gaussian", de
h, w = torch.meshgrid(
torch.arange(patch_size[0], device=device),
torch.arange(patch_size[1], device=device),
indexing='ij',
)
h, w = h / float(patch_size[0]), w / float(patch_size[1])
c_h, c_w = 0.5, 0.5
Expand Down
1 change: 1 addition & 0 deletions ptlflow/models/matchflow/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -268,6 +268,7 @@ def compute_weight(hws, image_shape, patch_size, sigma=1.0, wtype="gaussian", de
h, w = torch.meshgrid(
torch.arange(patch_size[0], device=device),
torch.arange(patch_size[1], device=device),
indexing='ij',
)
h, w = h / float(patch_size[0]), w / float(patch_size[1])
c_h, c_w = 0.5, 0.5
Expand Down

0 comments on commit d7b4600

Please sign in to comment.