Spaces:
Running on Zero
Running on Zero
Update megaflow/utils/basic.py
Browse files- megaflow/utils/basic.py +1 -1
megaflow/utils/basic.py
CHANGED
|
@@ -131,7 +131,7 @@ def meshgrid2d(B, Y, X, stack=False, device='cuda', on_chans=False):
|
|
| 131 |
|
| 132 |
def gridcloud2d(B, Y, X, norm=False, device='cuda'):
|
| 133 |
# we want to sample for each location in the grid
|
| 134 |
-
grid_y, grid_x = meshgrid2d(B, Y, X,
|
| 135 |
x = torch.reshape(grid_x, [B, -1])
|
| 136 |
y = torch.reshape(grid_y, [B, -1])
|
| 137 |
# these are B x N
|
|
|
|
| 131 |
|
| 132 |
def gridcloud2d(B, Y, X, norm=False, device='cuda'):
|
| 133 |
# we want to sample for each location in the grid
|
| 134 |
+
grid_y, grid_x = meshgrid2d(B, Y, X, device=device)
|
| 135 |
x = torch.reshape(grid_x, [B, -1])
|
| 136 |
y = torch.reshape(grid_y, [B, -1])
|
| 137 |
# these are B x N
|