MCPcopy Create free account
hub / github.com/KimMeen/Time-LLM / forward

Method forward

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

Source from the content-addressed store, hash-verified

93 self.activation = F.relu if activation == "relu" else F.gelu
94
95 def forward(self, x, attn_mask=None):
96 new_x, attn = self.attention(
97 x, x, x,
98 attn_mask=attn_mask
99 )
100 x = x + self.dropout(new_x)
101 x, _ = self.decomp1(x)
102 y = x
103 y = self.dropout(self.activation(self.conv1(y.transpose(-1, 1))))
104 y = self.dropout(self.conv2(y).transpose(-1, 1))
105 res, _ = self.decomp2(x + y)
106 return res, attn
107
108
109class Encoder(nn.Module):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected