MCPcopy Create free account
hub / github.com/alinlab/SelfPatch / forward

Method forward

segmentation/backbones/resnest.py:29–37  ·  view source on GitHub ↗
(self, x)

Source from the content-addressed store, hash-verified

27 self.groups = groups
28
29 def forward(self, x):
30 batch = x.size(0)
31 if self.radix > 1:
32 x = x.view(batch, self.groups, self.radix, -1).transpose(1, 2)
33 x = F.softmax(x, dim=1)
34 x = x.reshape(batch, -1)
35 else:
36 x = torch.sigmoid(x)
37 return x
38
39
40class SplitAttentionConv2d(nn.Module):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected