MCPcopy Create free account
hub / github.com/ZhengPeng7/BiRefNet / _ASPPModule

Class _ASPPModule

models/modules/aspp.py:11–23  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

9
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(in_channels, planes, kernel_size=kernel_size,
15 stride=1, padding=padding, dilation=dilation, bias=False)
16 self.bn = nn.BatchNorm2d(planes) if config.batch_size > 1 else nn.Identity()
17 self.relu = nn.ReLU(inplace=True)
18
19 def forward(self, x):
20 x = self.atrous_conv(x)
21 x = self.bn(x)
22
23 return self.relu(x)
24
25
26class ASPP(nn.Module):

Callers 1

__init__Method · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected