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

Function coords_grid

evaluation_DVL.py:32–35  ·  view source on GitHub ↗
(batch, ht, wd)

Source from the content-addressed store, hash-verified

30from metrics import metrics
31
32def coords_grid(batch, ht, wd):
33 coords = torch.meshgrid(torch.arange(ht), torch.arange(wd))
34 coords = torch.stack(coords[::-1], dim=0).float()
35 return coords[None].repeat(batch, 1, 1, 1)
36def image_flow_warp(image, flow, padding_mode='zeros'):
37 '''
38 Input:

Callers 2

image_flow_warpFunction · 0.70
blend_lifeFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected