public abstract class Layer extends Object implements Serializable, Cloneable
Modifier and Type | Class and Description |
---|---|
static class |
Layer.Builder<T extends Layer.Builder<T>> |
Modifier and Type | Field and Description |
---|---|
protected String |
activationFunction |
protected double |
adamMeanDecay |
protected double |
adamVarDecay |
protected double |
biasInit |
protected double |
biasL1 |
protected double |
biasL2 |
protected double |
biasLearningRate |
protected Distribution |
dist |
protected double |
dropOut |
protected double |
epsilon |
protected GradientNormalization |
gradientNormalization |
protected double |
gradientNormalizationThreshold |
protected double |
l1 |
protected double |
l2 |
protected String |
layerName |
protected double |
learningRate |
protected Map<Integer,Double> |
learningRateSchedule |
protected double |
momentum |
protected Map<Integer,Double> |
momentumSchedule |
protected double |
rho |
protected double |
rmsDecay |
protected Updater |
updater |
protected WeightInit |
weightInit |
Constructor and Description |
---|
Layer(Layer.Builder builder) |
Modifier and Type | Method and Description |
---|---|
Layer |
clone() |
abstract double |
getL1ByParam(String paramName)
Get the L1 coefficient for the given parameter.
|
abstract double |
getL2ByParam(String paramName)
Get the L2 coefficient for the given parameter.
|
abstract double |
getLearningRateByParam(String paramName)
Get the (initial) learning rate coefficient for the given parameter.
|
abstract InputType |
getOutputType(InputType inputType)
For a given type of input to this layer, what is the type of the output?
|
abstract InputPreProcessor |
getPreProcessorForInputType(InputType inputType)
For the given type of input to this layer, what preprocessor (if any) is required?
Returns null if no preprocessor is required, otherwise returns an appropriate InputPreProcessor
for this layer, such as a CnnToFeedForwardPreProcessor |
Updater |
getUpdaterByParam(String paramName)
Get the updater for the given parameter.
|
abstract ParamInitializer |
initializer() |
abstract Layer |
instantiate(NeuralNetConfiguration conf,
Collection<IterationListener> iterationListeners,
int layerIndex,
org.nd4j.linalg.api.ndarray.INDArray layerParamsView,
boolean initializeParams) |
abstract void |
setNIn(InputType inputType,
boolean override)
Set the nIn value (number of inputs, or input depth for CNNs) based on the given input type
|
protected String layerName
protected String activationFunction
protected WeightInit weightInit
protected double biasInit
protected Distribution dist
protected double learningRate
protected double biasLearningRate
protected double momentum
protected double l1
protected double l2
protected double biasL1
protected double biasL2
protected double dropOut
protected Updater updater
protected double rho
protected double epsilon
protected double rmsDecay
protected double adamMeanDecay
protected double adamVarDecay
protected GradientNormalization gradientNormalization
protected double gradientNormalizationThreshold
public Layer(Layer.Builder builder)
public abstract Layer instantiate(NeuralNetConfiguration conf, Collection<IterationListener> iterationListeners, int layerIndex, org.nd4j.linalg.api.ndarray.INDArray layerParamsView, boolean initializeParams)
public abstract ParamInitializer initializer()
public abstract InputType getOutputType(InputType inputType)
inputType
- Type of input for the layerIllegalStateException
- if input type is invalid for this layerpublic abstract void setNIn(InputType inputType, boolean override)
inputType
- Input type for this layeroverride
- If false: only set the nIn value if it's not already set. If true: set it regardless of whether it's
already set or not.IllegalStateException
- if input type is invalid for this layerpublic abstract InputPreProcessor getPreProcessorForInputType(InputType inputType)
InputPreProcessor
for this layer, such as a CnnToFeedForwardPreProcessor
inputType
- InputType to this layerIllegalStateException
- if input type is invalid for this layerpublic abstract double getL1ByParam(String paramName)
paramName
- Parameter namepublic abstract double getL2ByParam(String paramName)
paramName
- Parameter namepublic abstract double getLearningRateByParam(String paramName)
paramName
- Parameter nameCopyright © 2016. All Rights Reserved.