Init method based on N(0, sigma).
(sigma)
| 153 | tensor.data = new_data_tensor |
| 154 | |
| 155 | def init_method_normal(sigma): |
| 156 | """Init method based on N(0, sigma).""" |
| 157 | |
| 158 | def init_(tensor): |
| 159 | return torch.nn.init.normal_(tensor, mean=0.0, std=sigma) |
| 160 | |
| 161 | return init_ |
| 162 | |
| 163 | |
| 164 | def scaled_init_method_normal(sigma, num_layers): |