MCPcopy Create free account
hub / github.com/cure-lab/LTSF-Linear / Decoder

Class Decoder

layers/Transformer_EncDec.py:115–131  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers 2

__init__Method · 0.90
__init__Method · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected