torch.nn.init.normal_
function normal_(tensor: Tensor, options?: NormalOptions): Tensorfunction normal_(tensor: Tensor, mean: number, std: number, options?: NormalOptions): TensorFill the input Tensor with values drawn from the normal distribution N(mean, std^2).
Parameters
tensorTensor- An n-dimensional Tensor
optionsNormalOptionsoptional- Optional settings for normal initialization
Returns
Tensor– The input tensor filled with normal valuesExamples
const w = torch.empty(3, 5);
torch.nn.init.normal_(w, { mean: 0, std: 0.02 });