Show / Hide Table of Contents

Namespace Keras.Initializer

Classes

Constant

Initializer that generates tensors initialized to a constant value.

GlorotNormal

Glorot normal initializer, also called Xavier normal initializer. It draws samples from a truncated normal distribution centered on 0 with stddev = sqrt(2 / (fan_in + fan_out)) where fan_in is the number of input units in the weight tensor and fan_out is the number of output units in the weight tensor.

GlorotUniform

Glorot uniform initializer, also called Xavier uniform initializer. It draws samples from a uniform distribution within[-limit, limit] where limit is sqrt(6 / (fan_in + fan_out)) where fan_in is the number of input units in the weight tensor and fan_out is the number of output units in the weight tensor.

HeNormal

He normal initializer. It draws samples from a truncated normal distribution centered on 0 with stddev = sqrt(2 / fan_in) where fan_in is the number of input units in the weight tensor.

HeUniform

He uniform variance scaling initializer. It draws samples from a uniform distribution within[-limit, limit] where limit is sqrt(6 / fan_in) where fan_in is the number of input units in the weight tensor.

Identity

Initializer that generates the identity matrix. Only use for 2D matrices.If the desired matrix is not square, it pads with zeros on the additional rows/columns

LecunNormal

LeCun normal initializer. It draws samples from a truncated normal distribution centered on 0 with stddev = sqrt(1 / fan_in) where fan_in is the number of input units in the weight tensor.

LecunUniform

LeCun uniform initializer. It draws samples from a uniform distribution within[-limit, limit] where limit is sqrt(3 / fan_in) where fan_in is the number of input units in the weight tensor.

Ones

Initializer that generates tensors initialized to 1.

Orthogonal

Initializer that generates a random orthogonal matrix.

RandomNormal

Initializer that generates tensors with a normal distribution.

RandomUniform

Initializer that generates tensors with a uniform distribution.

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.

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).

Zeros

Initializer that generates tensors initialized to 0.

Back to top Generated by DocFX