(batch, ht, wd)
| 30 | from metrics import metrics |
| 31 | |
| 32 | def 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) |
| 36 | def image_flow_warp(image, flow, padding_mode='zeros'): |
| 37 | ''' |
| 38 | Input: |
no outgoing calls
no test coverage detected