MCPcopy Create free account
hub / github.com/TEA-Lab/TwoByTwo / Decoder

Class Decoder

src/shape_assembly/models/train/transformer.py:48–57  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

46 return self.norm(x)
47
48class Decoder(pl.LightningModule):
49 def __init__(self, layer, N):
50 super().__init__()
51 self.layers = clones(layer, N)
52 self.norm = LayerNorm(layer.size)
53
54 def forward(self, x, memory, src_mask, tgt_mask):
55 for layer in self.layers:
56 x = layer(x, memory, src_mask, tgt_mask)
57 return self.norm(x)
58
59class LayerNorm(pl.LightningModule):
60 def __init__(self, features, eps=1e-6):

Callers 1

__init__Method · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected