jsat.classifiers.neuralnetwork.initializers
Class ConstantInit
- java.lang.Object
-
- jsat.classifiers.neuralnetwork.initializers.ConstantInit
-
- All Implemented Interfaces:
- java.io.Serializable, BiastInitializer
public class ConstantInit extends java.lang.Object implements BiastInitializer
This initializes all bias values to a single constant value- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor and Description ConstantInit(double c)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description ConstantInitclone()doublegetConstant()voidinit(Vec b, int fanIn, java.util.Random rand)Performs the initialization of the given vector of bias valuesvoidsetConstant(double c)
-
-
-
Constructor Detail
-
ConstantInit
public ConstantInit(double c)
- Parameters:
c- the constant to set all biases to
-
-
Method Detail
-
setConstant
public void setConstant(double c)
- Parameters:
c- the constant value to use
-
getConstant
public double getConstant()
- Returns:
- the constant value that will be used for initialization
-
init
public void init(Vec b, int fanIn, java.util.Random rand)
Description copied from interface:BiastInitializerPerforms the initialization of the given vector of bias values- Specified by:
initin interfaceBiastInitializer- Parameters:
b- the vector to store the biases infanIn- the number of connections coming into the layer that these biases are for.rand- the source of randomness for initialization
-
clone
public ConstantInit clone()
- Specified by:
clonein interfaceBiastInitializer- Overrides:
clonein classjava.lang.Object
-
-
DataMelt 3.0 © DataMelt by jWork.ORG