Welcome to our Support Center

VarianceScaling

Description

Initializer that adapts its scale to the shape of its input tensors. Type : polymorphic.

 

 

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], where limit = sqrt(3 * scale / n).

 

Input parameters

 

 Parameters : cluster,

mode : enum, one of "fan_in""fan_out""fan_avg".
distrib : enum, random distribution to use. One of "truncated_normal""untruncated_normal", or "uniform".
scale : float, scaling factor.
 seed : integer, used to make the behavior of the initializer deterministic. Note that an initializer seeded with an integer or -1 (unseeded) will produce the same random values across multiple calls.

 

 

Output parameters

 

Initializer : cluster, this cluster defines the weight initialization strategy for a model.

enum : enum, an enumeration indicating the initialization type (e.g., Zeros, Glorot, HeNormal, etc.). If enum is set to CustomInitializer, the custom class on the right will be used. Otherwise, the selected initialization strategy will be applied with default parameters.
 Class : object, a custom initializer class instance.

Example

All these exemples are snippets PNG, you can drop these Snippet onto the block diagram and get the depicted code added to your VI (Do not forget to install Deep Learning library to run it).

Table of Contents