MCPcopy Create free account
hub / github.com/Project-MONAI/MONAI / make_grid

Function make_grid

tests/networks/layers/test_grid_pull.py:30–33  ·  view source on GitHub ↗
(shape, dtype=None, device=None, requires_grad=True)

Source from the content-addressed store, hash-verified

28
29
30def make_grid(shape, dtype=None, device=None, requires_grad=True):
31 ranges = [torch.arange(float(s), dtype=dtype, device=device, requires_grad=requires_grad) for s in shape]
32 grid = torch.stack(meshgrid_ij(*ranges), dim=-1)
33 return grid[None]
34
35
36# 1D combinations of bounds/interpolations

Callers 1

test_grid_pull.pyFile · 0.85

Calls 1

meshgrid_ijFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…