MCPcopy Create free account
hub / github.com/ChinaYi/ASFormer / __init__

Method __init__

model.py:215–222  ·  view source on GitHub ↗
(self, dilation, in_channels, out_channels, r1, r2, att_type, stage, alpha)

Source from the content-addressed store, hash-verified

213
214class AttModule(nn.Module):
215 def __init__(self, dilation, in_channels, out_channels, r1, r2, att_type, stage, alpha):
216 super(AttModule, self).__init__()
217 self.feed_forward = ConvFeedForward(dilation, in_channels, out_channels)
218 self.instance_norm = nn.InstanceNorm1d(in_channels, track_running_stats=False)
219 self.att_layer = AttLayer(in_channels, in_channels, out_channels, r1, r1, r2, dilation, att_type=att_type, stage=stage) # dilation
220 self.conv_1x1 = nn.Conv1d(out_channels, out_channels, 1)
221 self.dropout = nn.Dropout()
222 self.alpha = alpha
223
224 def forward(self, x, f, mask):
225 out = self.feed_forward(x)

Callers

nothing calls this directly

Calls 3

ConvFeedForwardClass · 0.85
AttLayerClass · 0.85
__init__Method · 0.45

Tested by

no test coverage detected