MCPcopy Create free account
hub / github.com/BorealisAI/scaleformer / forward

Method forward

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

Source from the content-addressed store, hash-verified

141 self.projection = projection
142
143 def forward(self, x, cross, x_mask=None, cross_mask=None):
144 for layer in self.layers:
145 x = layer(x, cross, x_mask=x_mask, cross_mask=cross_mask)
146
147 if self.norm is not None:
148 x = self.norm(x)
149
150 if self.projection is not None:
151 x = self.projection(x)
152 return x

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected