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

Method forward

model.py:224–229  ·  view source on GitHub ↗
(self, x, f, mask)

Source from the content-addressed store, hash-verified

222 self.alpha = alpha
223
224 def forward(self, x, f, mask):
225 out = self.feed_forward(x)
226 out = self.alpha * self.att_layer(self.instance_norm(out), f, mask) + out
227 out = self.conv_1x1(out)
228 out = self.dropout(out)
229 return (x + out) * mask[:, 0:1, :]
230
231
232class PositionalEncoding(nn.Module):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected