Class VarianceScaling
Initializer capable of adapting its scale to the shape of weights. With distribution = "normal", samples are drawn from a truncated normal distribution centered on zero, with stddev = sqrt(scale / n) where n is: number of input units in the weight tensor, if mode = "fan_in", number of output units, if mode = "fan_out", average of the numbers of input and output units, if mode = "fan_avg", With distribution = "uniform", samples are drawn from a uniform distribution within[-limit, limit], with limit = sqrt(3 * scale / n).
Implements
System.IDisposable
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Keras.Initializer
Assembly: Keras.dll
Syntax
public class VarianceScaling : Base, IDisposable
Constructors
| Improve this Doc View SourceVarianceScaling(Single, String, String, Nullable<Int32>)
Initializes a new instance of the VarianceScaling class.
Declaration
public VarianceScaling(float scale = 1F, string mode = "fan_in", string distribution = "normal", int? seed = default(int? ))
Parameters
Type | Name | Description |
---|---|---|
System.Single | scale | Scaling factor (positive float). |
System.String | mode | One of "fan_in", "fan_out", "fan_avg". |
System.String | distribution | Random distribution to use. One of "normal", "uniform". |
System.Nullable<System.Int32> | seed | The seed number for random generator |
Implements
System.IDisposable