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

Method __init__

torchscript/modnet_torchscript.py:96–105  ·  view source on GitHub ↗
(self, backbone)

Source from the content-addressed store, hash-verified

94 """
95
96 def __init__(self, backbone):
97 super(LRBranch, self).__init__()
98
99 enc_channels = backbone.enc_channels
100
101 self.backbone = backbone
102 self.se_block = SEBlock(enc_channels[4], enc_channels[4], reduction=4)
103 self.conv_lr16x = Conv2dIBNormRelu(enc_channels[4], enc_channels[3], 5, stride=1, padding=2)
104 self.conv_lr8x = Conv2dIBNormRelu(enc_channels[3], enc_channels[2], 5, stride=1, padding=2)
105 self.conv_lr = Conv2dIBNormRelu(enc_channels[2], 1, kernel_size=3, stride=2, padding=1, with_ibn=False, with_relu=False)
106
107 def forward(self, img):
108 enc_features = self.backbone.forward(img)

Callers

nothing calls this directly

Calls 3

SEBlockClass · 0.70
Conv2dIBNormReluClass · 0.70
__init__Method · 0.45

Tested by

no test coverage detected