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

Method forward

lib/Modules.py:228–233  ·  view source on GitHub ↗
(self, x)

Source from the content-addressed store, hash-verified

226 self.sigmoid = nn.Sigmoid()
227
228 def forward(self, x):
229 avgout = torch.mean(x, dim=1, keepdim=True)
230 maxout, _ = torch.max(x, dim=1, keepdim=True)
231 out = torch.cat([avgout, maxout], dim=1)
232 out = self.sigmoid(self.conv2d(out))
233 return out
234
235
236class CBAM(nn.Module):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected