MCPcopy Create free account
hub / github.com/OpenGVLab/HumanBench / __init__

Method __init__

PATH/core/models/necks/attention.py:87–91  ·  view source on GitHub ↗
(self, channel=512,reduction=16,kernel_size=7, use_cls_token=False)

Source from the content-addressed store, hash-verified

85
86class CBAMBlock(nn.Module):
87 def __init__(self, channel=512,reduction=16,kernel_size=7, use_cls_token=False):
88 super().__init__()
89 self.ca = ChannelAttention(channel=channel,reduction=reduction)
90 self.sa = SpatialAttention(kernel_size=kernel_size)
91 self.use_cls_token = use_cls_token
92
93
94 def init_weights(self):

Callers 4

__init__Method · 0.45
__init__Method · 0.45
__init__Method · 0.45
__init__Method · 0.45

Calls 2

ChannelAttentionClass · 0.85
SpatialAttentionClass · 0.85

Tested by

no test coverage detected