MCPcopy Create free account
hub / github.com/RolandGao/RegSeg / forward

Method forward

competitor_blocks.py:44–55  ·  view source on GitHub ↗
(self, x)

Source from the content-addressed store, hash-verified

42 self.flow_make = nn.Conv2d(outplane*2, 2, kernel_size=3, padding=1, bias=False)
43
44 def forward(self, x):
45 low_feature, h_feature = x
46 h_feature_orign = h_feature
47 h, w = low_feature.size()[2:]
48 size = (h, w)
49 low_feature = self.down_l(low_feature)
50 h_feature= self.down_h(h_feature)
51 h_feature = F.interpolate(h_feature,size=size,mode="bilinear",align_corners=False)
52 flow = self.flow_make(torch.cat([h_feature, low_feature], 1))
53 h_feature = self.flow_warp(h_feature_orign, flow, size=size)
54
55 return h_feature
56
57 def flow_warp(self, input, flow, size):
58 out_h, out_w = size

Callers

nothing calls this directly

Calls 1

flow_warpMethod · 0.95

Tested by

no test coverage detected