(self, fmap1, fmap2, num_levels=4, radius=4)
| 63 | |
| 64 | class AlternateCorrBlock: |
| 65 | def __init__(self, fmap1, fmap2, num_levels=4, radius=4): |
| 66 | self.num_levels = num_levels |
| 67 | self.radius = radius |
| 68 | |
| 69 | self.pyramid = [(fmap1, fmap2)] |
| 70 | for i in range(self.num_levels): |
| 71 | fmap1 = F.avg_pool2d(fmap1, 2, stride=2) |
| 72 | fmap2 = F.avg_pool2d(fmap2, 2, stride=2) |
| 73 | self.pyramid.append((fmap1, fmap2)) |
| 74 | |
| 75 | def __call__(self, coords): |
| 76 | coords = coords.permute(0, 2, 3, 1) |
nothing calls this directly
no outgoing calls
no test coverage detected