Show / Hide Table of Contents

Class TruncatedNormal

Initializer that generates a truncated normal distribution. These values are similar to values from a RandomNormal except that values more than two standard deviations from the mean are discarded and redrawn. This is the recommended initializer for neural network weights and filters.

Inheritance
System.Object
BaseInitializer
TruncatedNormal
Inherited Members
BaseInitializer.Name
Namespace: SiaNet.Initializers
Assembly: SiaNet.dll
Syntax
public class TruncatedNormal : BaseInitializer

Constructors

| Improve this Doc View Source

TruncatedNormal(Single, Single, Nullable<Int32>)

Initializes a new instance of the TruncatedNormal class.

Declaration
public TruncatedNormal(float mean = 0F, float stddev = 0.05F, int? seed = default(int? ))
Parameters
Type Name Description
System.Single mean

Mean of the random values to generate.

System.Single stddev

Standard deviation of the random values to generate.

System.Nullable<System.Int32> seed

Used to seed the random generator.

Properties

| Improve this Doc View Source

MeanVal

Mean of the random values to generate.

Declaration
public float MeanVal { get; set; }
Property Value
Type Description
System.Single

The mean value.

| Improve this Doc View Source

Seed

Used to seed the random generator.

Declaration
public int? Seed { get; set; }
Property Value
Type Description
System.Nullable<System.Int32>

The seed.

| Improve this Doc View Source

StdDev

Standard deviation of the random values to generate.

Declaration
public float StdDev { get; set; }
Property Value
Type Description
System.Single

The standard dev.

Methods

| Improve this Doc View Source

Generate(Int64[])

Generates a tensor with specified shape.

Declaration
public override Tensor Generate(params long[] shape)
Parameters
Type Name Description
System.Int64[] shape

The shape of the tensor.

Returns
Type Description
Tensor
Overrides
BaseInitializer.Generate(Int64[])

See Also

BaseInitializer
  • Improve this Doc
  • View Source
Back to top Generated by DocFX