MCPcopy Create free account
hub / github.com/Mew233/pairwise / forward

Method forward

pairwise/utilitis.py:406–411  ·  view source on GitHub ↗
(self, x, mask=None)

Source from the content-addressed store, hash-verified

404 self.dropout_2 = nn.Dropout(dropout)
405
406 def forward(self, x, mask=None):
407 x2 = self.norm_1(x)
408 x = x + self.dropout_1(self.attn(x2, x2, x2, mask))
409 x2 = self.norm_2(x)
410 x = x + self.dropout_2(self.ff(x2))
411 return x
412
413
414# build a decoder layer with two multi-head attention layers and

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected