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

Class Decoder

layers/Transformer_EncDec.py:119–135  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

117
118
119class Decoder(nn.Module):
120 def __init__(self, layers, norm_layer=None, projection=None):
121 super(Decoder, self).__init__()
122 self.layers = nn.ModuleList(layers)
123 self.norm = norm_layer
124 self.projection = projection
125
126 def forward(self, x, cross, x_mask=None, cross_mask=None, tau=None, delta=None):
127 for layer in self.layers:
128 x = layer(x, cross, x_mask=x_mask, cross_mask=cross_mask, tau=tau, delta=delta)
129
130 if self.norm is not None:
131 x = self.norm(x)
132
133 if self.projection is not None:
134 x = self.projection(x)
135 return x

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected