MCPcopy Index your code
hub / github.com/geekcomputers/Python / __init__

Method __init__

ML/src/python/neuralforge/nn/layers.py:142–150  ·  view source on GitHub ↗
(self, channels, reduction=16)

Source from the content-addressed store, hash-verified

140
141class SEBlock(nn.Module):
142 def __init__(self, channels, reduction=16):
143 super().__init__()
144 self.squeeze = nn.AdaptiveAvgPool2d(1)
145 self.excitation = nn.Sequential(
146 nn.Linear(channels, channels // reduction, bias=False),
147 nn.ReLU(inplace=True),
148 nn.Linear(channels // reduction, channels, bias=False),
149 nn.Sigmoid()
150 )
151
152 def forward(self, x):
153 b, c, _, _ = x.size()

Callers 8

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

Calls

no outgoing calls

Tested by

no test coverage detected