MCPcopy Create free account
hub / github.com/aigc3d/LHM / __init__

Method __init__

engine/BiRefNet/models/modules/aspp.py:12–24  ·  view source on GitHub ↗
(self, in_channels, planes, kernel_size, padding, dilation)

Source from the content-addressed store, hash-verified

10
11class _ASPPModule(nn.Module):
12 def __init__(self, in_channels, planes, kernel_size, padding, dilation):
13 super(_ASPPModule, self).__init__()
14 self.atrous_conv = nn.Conv2d(
15 in_channels,
16 planes,
17 kernel_size=kernel_size,
18 stride=1,
19 padding=padding,
20 dilation=dilation,
21 bias=False,
22 )
23 self.bn = nn.BatchNorm2d(planes) if config.batch_size > 1 else nn.Identity()
24 self.relu = nn.ReLU(inplace=True)
25
26 def forward(self, x):
27 x = self.atrous_conv(x)

Callers

nothing calls this directly

Calls 1

__init__Method · 0.45

Tested by

no test coverage detected