MCPcopy Create free account
hub / github.com/Oneflow-Inc/oneflow / reset_parameters

Method reset_parameters

python/oneflow/nn/modules/normalization.py:333–336  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

331 self.reset_parameters()
332
333 def reset_parameters(self) -> None:
334 if self.elementwise_affine:
335 init.ones_(self.weight)
336 init.zeros_(self.bias)
337
338 def forward(self, x):
339 return layer_norm(x, self.normalized_shape, self.weight, self.bias, self.eps)

Callers 1

__init__Method · 0.95

Calls 1

zeros_Method · 0.80

Tested by

no test coverage detected