Skip to content

Commit

Permalink
Make grid float instead of int
Browse files Browse the repository at this point in the history
  • Loading branch information
jloveric committed Jun 23, 2024
1 parent b122a2f commit 5722b5c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions examples/block_mnist.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@
}

grid_x, grid_y = torch.meshgrid(
(torch.arange(28) - 14) // 14, (torch.arange(28) - 14) // 14, indexing="ij"
(torch.arange(28) - 14) / 14, (torch.arange(28) - 14) / 14, indexing="ij"
)
grid = torch.stack([grid_x, grid_y])

print('grid', grid)

def collate_fn(batch):

Expand Down

0 comments on commit 5722b5c

Please sign in to comment.