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

Class CBAM

lib/Modules.py:236–245  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

234
235
236class CBAM(nn.Module):
237 def __init__(self, channel):
238 super(CBAM, self).__init__()
239 self.channel_attention = ChannelAttentionModule(channel)
240 self.spatial_attention = SpatialAttentionModule()
241
242 def forward(self, x):
243 out = self.channel_attention(x) * x
244 out = self.spatial_attention(out) * out
245 return out
246
247
248class InterFA(nn.Module):

Callers 1

__init__Method · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected