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

Method __init__

lib/Modules.py:476–483  ·  view source on GitHub ↗
(self, in_channels)

Source from the content-addressed store, hash-verified

474
475class getAlpha(nn.Module):
476 def __init__(self, in_channels):
477 super(getAlpha, self).__init__()
478 self.avg_pool = nn.AdaptiveAvgPool2d(1)
479 self.max_pool = nn.AdaptiveMaxPool2d(1)
480 self.fc1 = nn.Conv2d(in_channels*2,in_channels,kernel_size =1, bias=False)
481 self.relu1 = nn.ReLU()
482 self.fc2 = nn.Conv2d(in_channels,1, 1, bias=False)
483 self.sigmoid = nn.Sigmoid()
484
485 def forward(self, x):
486 avg_out = self.fc2(self.relu1(self.fc1(self.avg_pool(x))))

Callers

nothing calls this directly

Calls 1

__init__Method · 0.45

Tested by

no test coverage detected