MCPcopy Create free account
hub / github.com/ChunmingHe/WS-SAM / __init__

Method __init__

lib/Modules.py:223–226  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

221
222class SpatialAttentionModule(nn.Module):
223 def __init__(self):
224 super(SpatialAttentionModule, self).__init__()
225 self.conv2d = nn.Conv2d(in_channels=2, out_channels=1, kernel_size=7, stride=1, padding=3)
226 self.sigmoid = nn.Sigmoid()
227
228 def forward(self, x):
229 avgout = torch.mean(x, dim=1, keepdim=True)

Callers

nothing calls this directly

Calls 1

__init__Method · 0.45

Tested by

no test coverage detected