VarianceScaling
open class VarianceScaling(scale: Double, mode: Mode, distribution: Distribution, seed: Long) : Initializer
Content copied to clipboard
Initializer capable of adapting its scale to the shape of weights tensors.
With distribution="truncated_normal" or "untruncated_normal"
, samples are drawn from a truncated/untruncated normal distribution with a mean of zero and a standard deviation (after truncation, if used) 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)
.
Constructors
VarianceScaling
Link copied to clipboard
fun VarianceScaling(scale: Double = 1.0, mode: Mode = Mode.FAN_IN, distribution: Distribution = Distribution.TRUNCATED_NORMAL, seed: Long = 12L)
Content copied to clipboard
Creates VarianceScaling initializer.
Functions
Properties
Inheritors
GlorotNormal
Link copied to clipboard
GlorotUniform
Link copied to clipboard
HeNormal
Link copied to clipboard
HeUniform
Link copied to clipboard
LeCunNormal
Link copied to clipboard
LeCunUniform
Link copied to clipboard