MCPcopy Create free account
hub / github.com/geekcomputers/Python / __init__

Method __init__

ML/src/python/neuralforge/nn/modules.py:168–170  ·  view source on GitHub ↗
(self, kernel_size=7)

Source from the content-addressed store, hash-verified

166
167class SpatialAttention(nn.Module):
168 def __init__(self, kernel_size=7):
169 super().__init__()
170 self.conv = nn.Conv2d(2, 1, kernel_size, padding=kernel_size // 2)
171
172 def forward(self, x):
173 avg_out = torch.mean(x, dim=1, keepdim=True)

Callers

nothing calls this directly

Calls 1

__init__Method · 0.45

Tested by

no test coverage detected