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.
Inherited Members
Namespace: SiaNet.Initializers
Assembly: SiaNet.dll
Syntax
public class TruncatedNormal : BaseInitializer
Constructors
| Improve this Doc View SourceTruncatedNormal(Single, Single, Nullable<Int32>)
Initializes a new instance of the Truncated
Declaration
public TruncatedNormal(float mean = 0F, float stddev = 0.05F, int? seed = default(int? ))
Parameters
Type | Name | Description |
---|---|---|
System. |
mean | Mean of the random values to generate. |
System. |
stddev | Standard deviation of the random values to generate. |
System. |
seed | Used to seed the random generator. |
Properties
| Improve this Doc View SourceMeanVal
Mean of the random values to generate.
Declaration
public float MeanVal { get; set; }
Property Value
Type | Description |
---|---|
System. |
The mean value. |
Seed
Used to seed the random generator.
Declaration
public int? Seed { get; set; }
Property Value
Type | Description |
---|---|
System. |
The seed. |
StdDev
Standard deviation of the random values to generate.
Declaration
public float StdDev { get; set; }
Property Value
Type | Description |
---|---|
System. |
The standard dev. |
Methods
| Improve this Doc View SourceGenerate(Int64[])
Generates a tensor with specified shape.
Declaration
public override Tensor Generate(params long[] shape)
Parameters
Type | Name | Description |
---|---|---|
System. |
shape | The shape of the tensor. |
Returns
Type | Description |
---|---|
Tensor |