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

Method forward

LDPS_Graph/layers/Transformer_EncDec.py:122–131  ·  view source on GitHub ↗
(self, x, cross, x_mask=None, cross_mask=None)

Source from the content-addressed store, hash-verified

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

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected