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 (positive float).
 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

 

VarianceScaling out : class

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 HAIBAL library to run it).

Table of Contents