MCPcopy Create free account
hub / github.com/ZHKKKe/MODNet / __init__

Method __init__

torchscript/modnet_torchscript.py:174–182  ·  view source on GitHub ↗
(self, hr_channels, enc_channels)

Source from the content-addressed store, hash-verified

172 """
173
174 def __init__(self, hr_channels, enc_channels):
175 super(FusionBranch, self).__init__()
176 self.conv_lr4x = Conv2dIBNormRelu(enc_channels[2], hr_channels, 5, stride=1, padding=2)
177
178 self.conv_f2x = Conv2dIBNormRelu(2 * hr_channels, hr_channels, 3, stride=1, padding=1)
179 self.conv_f = nn.Sequential(
180 Conv2dIBNormRelu(hr_channels + 3, int(hr_channels / 2), 3, stride=1, padding=1),
181 Conv2dIBNormRelu(int(hr_channels / 2), 1, 1, stride=1, padding=0, with_ibn=False, with_relu=False),
182 )
183
184 def forward(self, img, lr8x, hr2x):
185 lr4x = F.interpolate(lr8x, scale_factor=2.0, mode='bilinear', align_corners=False)

Callers

nothing calls this directly

Calls 2

Conv2dIBNormReluClass · 0.70
__init__Method · 0.45

Tested by

no test coverage detected