Skip to content

Commit dda65c4

Browse files
committed
Merge branch 'dev' into 8185-tests-refactor
2 parents 6e9c66e + fa5c75c commit dda65c4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

monai/networks/blocks/pos_embed_utils.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ def build_sincos_position_embedding(
5656
grid_h = torch.arange(h, dtype=torch.float32)
5757
grid_w = torch.arange(w, dtype=torch.float32)
5858

59-
grid_h, grid_w = torch.meshgrid(grid_h, grid_w, indexing="ij")
59+
grid_h, grid_w = torch.meshgrid(grid_h, grid_w)
6060

6161
if embed_dim % 4 != 0:
6262
raise AssertionError("Embed dimension must be divisible by 4 for 2D sin-cos position embedding")
@@ -75,7 +75,7 @@ def build_sincos_position_embedding(
7575
grid_w = torch.arange(w, dtype=torch.float32)
7676
grid_d = torch.arange(d, dtype=torch.float32)
7777

78-
grid_h, grid_w, grid_d = torch.meshgrid(grid_h, grid_w, grid_d, indexing="ij")
78+
grid_h, grid_w, grid_d = torch.meshgrid(grid_h, grid_w, grid_d)
7979

8080
if embed_dim % 6 != 0:
8181
raise AssertionError("Embed dimension must be divisible by 6 for 3D sin-cos position embedding")

0 commit comments

Comments
 (0)