(batch, ht, wd)
| 91 | return img |
| 92 | |
| 93 | def coords_grid(batch, ht, wd): |
| 94 | coords = torch.meshgrid(torch.arange(ht), torch.arange(wd)) |
| 95 | coords = torch.stack(coords[::-1], dim=0).float() |
| 96 | return coords[None].repeat(batch, 1, 1, 1) |
| 97 | |
| 98 | |
| 99 | def upflow8(flow, mode='bilinear'): |
no outgoing calls
no test coverage detected