MCPcopy Create free account
hub / github.com/Haochen-Wang409/U2PL / __init__

Method __init__

u2pl/models/decoder.py:128–138  ·  view source on GitHub ↗
(self, in_planes, num_classes=19, sync_bn=False)

Source from the content-addressed store, hash-verified

126
127class Aux_Module(nn.Module):
128 def __init__(self, in_planes, num_classes=19, sync_bn=False):
129 super(Aux_Module, self).__init__()
130
131 norm_layer = get_syncbn() if sync_bn else nn.BatchNorm2d
132 self.aux = nn.Sequential(
133 nn.Conv2d(in_planes, 256, kernel_size=3, stride=1, padding=1),
134 norm_layer(256),
135 nn.ReLU(inplace=True),
136 nn.Dropout2d(0.1),
137 nn.Conv2d(256, num_classes, kernel_size=1, stride=1, padding=0, bias=True),
138 )
139
140 def forward(self, x):
141 res = self.aux(x)

Callers 2

__init__Method · 0.45
__init__Method · 0.45

Calls 1

get_syncbnFunction · 0.85

Tested by

no test coverage detected