MCPcopy Create free account
hub / github.com/drinkingcoder/FlowFormer-Official / __init__

Method __init__

core/corr.py:63–71  ·  view source on GitHub ↗
(self, fmap1, fmap2, num_levels=4, radius=4)

Source from the content-addressed store, hash-verified

61
62class AlternateCorrBlock:
63 def __init__(self, fmap1, fmap2, num_levels=4, radius=4):
64 self.num_levels = num_levels
65 self.radius = radius
66
67 self.pyramid = [(fmap1, fmap2)]
68 for i in range(self.num_levels):
69 fmap1 = F.avg_pool2d(fmap1, 2, stride=2)
70 fmap2 = F.avg_pool2d(fmap2, 2, stride=2)
71 self.pyramid.append((fmap1, fmap2))
72
73 def __call__(self, coords):
74 coords = coords.permute(0, 2, 3, 1)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected