MCPcopy Create free account
hub / github.com/MiniMax-AI/VTP / reset_parameters

Method reset_parameters

vtp/models/layers/normalization.py:14–15  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

12 self.eps = eps
13
14 def reset_parameters(self) -> None:
15 nn.init.constant_(self.weight, 1)
16
17 def _norm(self, x: Tensor) -> Tensor:
18 return x * torch.rsqrt(x.pow(2).mean(-1, keepdim=True) + self.eps)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected