MCPcopy Create free account
hub / github.com/zai-org/CodeGeeX / init_method_normal

Function init_method_normal

codegeex/megatron/model/utils.py:22–28  ·  view source on GitHub ↗

Init method based on N(0, sigma).

(sigma)

Source from the content-addressed store, hash-verified

20
21
22def init_method_normal(sigma):
23 """Init method based on N(0, sigma)."""
24
25 def init_(tensor):
26 return torch.nn.init.normal_(tensor, mean=0.0, std=sigma)
27
28 return init_
29
30
31def scaled_init_method_normal(sigma, num_layers):

Callers 4

__init__Method · 0.90
__init__Method · 0.90
get_language_modelFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected