Skip to content

Commit

Permalink
add cpu support as default device (facebookresearch#43)
Browse files Browse the repository at this point in the history
  • Loading branch information
bharat787 authored Oct 30, 2023
1 parent 4f297a9 commit 18040ab
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion cotracker/models/core/cotracker/cotracker.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
torch.manual_seed(0)


def get_points_on_a_grid(grid_size, interp_shape, grid_center=(0, 0), device="cuda"):
def get_points_on_a_grid(grid_size, interp_shape, grid_center=(0, 0), device="cpu"):
if grid_size == 1:
return torch.tensor([interp_shape[1] / 2, interp_shape[0] / 2], device=device)[
None, None
Expand Down
2 changes: 1 addition & 1 deletion cotracker/models/core/model_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def normalize(d):
return out


def meshgrid2d(B, Y, X, stack=False, norm=False, device="cuda"):
def meshgrid2d(B, Y, X, stack=False, norm=False, device="cpu"):
# returns a meshgrid sized B x Y x X

grid_y = torch.linspace(0.0, Y - 1, Y, device=torch.device(device))
Expand Down

0 comments on commit 18040ab

Please sign in to comment.