MCPcopy Create free account
hub / github.com/BorealisAI/scaleformer / forward

Method forward

layers/Autoformer_EncDec.py:37–40  ·  view source on GitHub ↗
(self, x)

Source from the content-addressed store, hash-verified

35 self.layernorm = nn.LayerNorm(channels)
36
37 def forward(self, x):
38 x_hat = self.layernorm(x)
39 bias = torch.mean(x_hat, dim=1).unsqueeze(1).repeat(1, x.shape[1], 1)
40 return x_hat - bias
41
42
43class moving_avg(nn.Module):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected