SiaNet/Initializers/TruncatedNormal.cs
/// <summary>
/// Generates a tensor with specified shape.
/// </summary>
/// <param name="shape">The shape of the tensor.</param>
/// <returns></returns>
Generates a tensor with specified shape.
Generates a tensor with specified shape .
public override Tensor Generate(params long[] shape)
        {
            float stddev = (float)Math.Sqrt(StdDev) / 0.87962566103423978f;
            return K.RandomNormal(shape, MeanVal, stddev, Seed);
        }
public override Tensor Generate ( params long [ ] shape ) { float stddev = ( float ) Math . Sqrt ( StdDev ) / 0.87962566103423978f ; return K . RandomNormal ( shape , MeanVal , stddev , Seed ) ; }
Generates a tensor with specified shape.
Generates a tensor with specified shape .
None
shape
The shape of the tensor.
The shape of the tensor .