MCPcopy Create free account
hub / github.com/DIVE128/DMVSNet / DeConv2dFuse

Class DeConv2dFuse

networks/module.py:253–271  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

251 return warped_src_fea,grid.view(batch, num_depth,height, width, 2)
252
253class DeConv2dFuse(nn.Module):
254 def __init__(self, in_channels, out_channels, kernel_size, relu=True, bn=True,
255 bn_momentum=0.1):
256 super(DeConv2dFuse, self).__init__()
257
258 self.deconv = Deconv2d(in_channels, out_channels, kernel_size, stride=2, padding=1, output_padding=1,
259 bn=True, relu=relu, bn_momentum=bn_momentum)
260
261 self.conv = Conv2d(2 * out_channels, out_channels, kernel_size, stride=1, padding=1,
262 bn=bn, relu=relu, bn_momentum=bn_momentum)
263
264 # assert init_method in ["kaiming", "xavier"]
265 # self.init_weights(init_method)
266
267 def forward(self, x_pre, x):
268 x = self.deconv(x)
269 x = torch.cat((x, x_pre), dim=1)
270 x = self.conv(x)
271 return x
272
273
274class FeatureNet(nn.Module):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected