MCPcopy Create free account
hub / github.com/Anoise/WTFlib / forward

Method forward

LDPS_Graph/layers/Autoformer_EncDec.py:87–98  ·  view source on GitHub ↗
(self, x, attn_mask=None)

Source from the content-addressed store, hash-verified

85 self.activation = F.relu if activation == "relu" else F.gelu
86
87 def forward(self, x, attn_mask=None):
88 new_x, attn = self.attention(
89 x, x, x,
90 attn_mask=attn_mask
91 )
92 x = x + self.dropout(new_x)
93 x, _ = self.decomp1(x)
94 y = x
95 y = self.dropout(self.activation(self.conv1(y.transpose(-1, 1))))
96 y = self.dropout(self.conv2(y).transpose(-1, 1))
97 res, _ = self.decomp2(x + y)
98 return res, attn
99
100
101class Encoder(nn.Module):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected