MCPcopy Create free account
hub / github.com/alinlab/SelfPatch / __init__

Method __init__

segmentation/backbones/bisenetv1.py:94–120  ·  view source on GitHub ↗
(self,
                 in_channels,
                 out_channel,
                 conv_cfg=None,
                 norm_cfg=dict(type='BN'),
                 act_cfg=dict(type='ReLU'),
                 init_cfg=None)

Source from the content-addressed store, hash-verified

92 """
93
94 def __init__(self,
95 in_channels,
96 out_channel,
97 conv_cfg=None,
98 norm_cfg=dict(type='BN'),
99 act_cfg=dict(type='ReLU'),
100 init_cfg=None):
101 super(AttentionRefinementModule, self).__init__(init_cfg=init_cfg)
102 self.conv_layer = ConvModule(
103 in_channels=in_channels,
104 out_channels=out_channel,
105 kernel_size=3,
106 stride=1,
107 padding=1,
108 conv_cfg=conv_cfg,
109 norm_cfg=norm_cfg,
110 act_cfg=act_cfg)
111 self.atten_conv_layer = nn.Sequential(
112 nn.AdaptiveAvgPool2d((1, 1)),
113 ConvModule(
114 in_channels=out_channel,
115 out_channels=out_channel,
116 kernel_size=1,
117 bias=False,
118 conv_cfg=conv_cfg,
119 norm_cfg=norm_cfg,
120 act_cfg=None), nn.Sigmoid())
121
122 def forward(self, x):
123 x = self.conv_layer(x)

Callers

nothing calls this directly

Calls 1

__init__Method · 0.45

Tested by

no test coverage detected