MCPcopy Create free account
hub / github.com/drinkingcoder/NeuralMarker / coords_grid

Function coords_grid

core/utils/utils.py:158–161  ·  view source on GitHub ↗
(batch, ht, wd, device='cpu')

Source from the content-addressed store, hash-verified

156
157
158def coords_grid(batch, ht, wd, device='cpu'):
159 coords = torch.meshgrid(torch.arange(ht, device=device), torch.arange(wd, device=device))
160 coords = torch.stack(coords[::-1], dim=0).float()
161 return coords[None].repeat(batch, 1, 1, 1)
162
163
164def upflow8(flow, mode='bilinear'):

Callers 9

synthesis_dataFunction · 0.90
estimateMethod · 0.90
__getitem__Method · 0.90
initialize_flowMethod · 0.90
initialize_flowMethod · 0.90
image_flow_warpFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected