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

Method __init__

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

Source from the content-addressed store, hash-verified

63
64class 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)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected