public enum WeightInit extends Enum<WeightInit>
DISTRIBUTION: Sample weights from a provided distribution
ZERO: Generate weights as zeros
ONES: All weights are set to 1
SIGMOID_UNIFORM: A version of XAVIER_UNIFORM for sigmoid activation functions. U(-r,r) with r=4*sqrt(6/(fanIn + fanOut))
NORMAL: Normal/Gaussian distribution, with mean 0 and standard deviation 1/sqrt(fanIn). This is the initialization recommented in Klambauer et al. 2017, "Self-Normalizing Neural Network". Equivalent to DL4J's XAVIER_FAN_IN and LECUN_NORMAL (i.e. Keras' "lecun_normal")
LECUN_UNIFORM Uniform U[-a,a] with a=3/sqrt(fanIn).
UNIFORM: Uniform U[-a,a] with a=1/sqrt(fanIn). "Commonly used heuristic" as per Glorot and Bengio 2010
XAVIER: As per Glorot and Bengio 2010: Gaussian distribution with mean 0, variance 2.0/(fanIn + fanOut)
XAVIER_UNIFORM: As per Glorot and Bengio 2010: Uniform distribution U(-s,s) with s = sqrt(6/(fanIn + fanOut))
XAVIER_FAN_IN: Similar to Xavier, but 1/fanIn -> Caffe originally used this.
XAVIER_LEGACY: Xavier weight init in DL4J up to 0.6.0. XAVIER should be preferred.
RELU: He et al. (2015), "Delving Deep into Rectifiers". Normal distribution with variance 2.0/nIn
RELU_UNIFORM: He et al. (2015), "Delving Deep into Rectifiers". Uniform distribution U(-s,s) with s = sqrt(6/fanIn)
IDENTITY: Weights are set to an identity matrix. Note: can only be used with square weight matrices
VAR_SCALING_NORMAL_FAN_IN Gaussian distribution with mean 0, variance 1.0/(fanIn)
VAR_SCALING_NORMAL_FAN_OUT Gaussian distribution with mean 0, variance 1.0/(fanOut)
VAR_SCALING_NORMAL_FAN_AVG Gaussian distribution with mean 0, variance 1.0/((fanIn + fanOut)/2)
VAR_SCALING_UNIFORM_FAN_IN Uniform U[-a,a] with a=3.0/(fanIn)
VAR_SCALING_UNIFORM_FAN_OUT Uniform U[-a,a] with a=3.0/(fanOut)
VAR_SCALING_UNIFORM_FAN_AVG Uniform U[-a,a] with a=3.0/((fanIn + fanOut)/2)
Modifier and Type | Method and Description |
---|---|
static WeightInit |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static WeightInit[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final WeightInit DISTRIBUTION
public static final WeightInit ZERO
public static final WeightInit ONES
public static final WeightInit SIGMOID_UNIFORM
public static final WeightInit NORMAL
public static final WeightInit LECUN_NORMAL
public static final WeightInit UNIFORM
public static final WeightInit XAVIER
public static final WeightInit XAVIER_UNIFORM
public static final WeightInit XAVIER_FAN_IN
public static final WeightInit XAVIER_LEGACY
public static final WeightInit RELU
public static final WeightInit RELU_UNIFORM
public static final WeightInit IDENTITY
public static final WeightInit LECUN_UNIFORM
public static final WeightInit VAR_SCALING_NORMAL_FAN_IN
public static final WeightInit VAR_SCALING_NORMAL_FAN_OUT
public static final WeightInit VAR_SCALING_NORMAL_FAN_AVG
public static final WeightInit VAR_SCALING_UNIFORM_FAN_IN
public static final WeightInit VAR_SCALING_UNIFORM_FAN_OUT
public static final WeightInit VAR_SCALING_UNIFORM_FAN_AVG
public static WeightInit[] values()
for (WeightInit c : WeightInit.values()) System.out.println(c);
public static WeightInit valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullCopyright © 2018. All rights reserved.