MCPcopy Create free account
hub / github.com/THUDM/GLM / unscaled_init_method

Function unscaled_init_method

mpu/transformer.py:584–590  ·  view source on GitHub ↗

Init method based on N(0, sigma).

(sigma)

Source from the content-addressed store, hash-verified

582
583
584def unscaled_init_method(sigma):
585 """Init method based on N(0, sigma)."""
586
587 def init_(tensor):
588 return torch.nn.init.normal_(tensor, mean=0.0, std=sigma)
589
590 return init_
591
592
593def scaled_init_method(sigma, num_layers):

Callers 1

get_layerMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected