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

Method __init__

src/shape_assembly/models/train/transformer.py:60–64  ·  view source on GitHub ↗
(self, features, eps=1e-6)

Source from the content-addressed store, hash-verified

58
59class LayerNorm(pl.LightningModule):
60 def __init__(self, features, eps=1e-6):
61 super().__init__()
62 self.a_2 = nn.Parameter(torch.ones(features))
63 self.b_2 = nn.Parameter(torch.zeros(features))
64 self.eps = eps
65
66 def forward(self, x):
67 mean = x.mean(-1, keepdim=True)

Callers

nothing calls this directly

Calls 1

__init__Method · 0.45

Tested by

no test coverage detected