public abstract class BaseSameDiffLayer extends AbstractSameDiffLayer
Modifier and Type | Class and Description |
---|---|
static class |
BaseSameDiffLayer.Builder<T extends BaseSameDiffLayer.Builder<T>> |
Modifier and Type | Field and Description |
---|---|
protected WeightInit |
weightInit |
biasUpdater, l1, l1Bias, l2, l2Bias, updater
constraints, iDropout, layerName
Modifier | Constructor and Description |
---|---|
protected |
BaseSameDiffLayer() |
protected |
BaseSameDiffLayer(BaseSameDiffLayer.Builder builder) |
Modifier and Type | Method and Description |
---|---|
void |
applyGlobalConfigToLayer(NeuralNetConfiguration.Builder globalConfig)
Apply the global configuration (weight init, activation function, etc) to this layer
|
abstract List<org.nd4j.autodiff.samediff.SDVariable> |
defineLayer(org.nd4j.autodiff.samediff.SameDiff sameDiff,
org.nd4j.autodiff.samediff.SDVariable layerInput,
Map<String,org.nd4j.autodiff.samediff.SDVariable> paramTable) |
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 |
Layer |
instantiate(NeuralNetConfiguration conf,
Collection<TrainingListener> trainingListeners,
int layerIndex,
org.nd4j.linalg.api.ndarray.INDArray layerParamsView,
boolean initializeParams) |
void |
setNIn(InputType inputType,
boolean override)
Set the nIn value (number of inputs, or input channels for CNNs) based on the given input type
|
applyGlobalConfig, defineParameters, getL1ByParam, getL2ByParam, getLayerParams, getMemoryReport, getOutputType, getUpdaterByParam, initializeParameters, initializer, initWeights, isPretrainParam, paramReshapeOrder
clone, initializeConstraints, resetLayerDefaultConfig
protected WeightInit weightInit
protected BaseSameDiffLayer(BaseSameDiffLayer.Builder builder)
protected BaseSameDiffLayer()
public abstract List<org.nd4j.autodiff.samediff.SDVariable> defineLayer(org.nd4j.autodiff.samediff.SameDiff sameDiff, org.nd4j.autodiff.samediff.SDVariable layerInput, Map<String,org.nd4j.autodiff.samediff.SDVariable> paramTable)
public void setNIn(InputType inputType, boolean override)
Layer
setNIn
in class AbstractSameDiffLayer
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.public InputPreProcessor getPreProcessorForInputType(InputType inputType)
Layer
InputPreProcessor
for this layer, such as a CnnToFeedForwardPreProcessor
getPreProcessorForInputType
in class AbstractSameDiffLayer
inputType
- InputType to this layerpublic void applyGlobalConfigToLayer(NeuralNetConfiguration.Builder globalConfig)
AbstractSameDiffLayer
applyGlobalConfigToLayer
in class AbstractSameDiffLayer
globalConfig
- Global configurationpublic Layer instantiate(NeuralNetConfiguration conf, Collection<TrainingListener> trainingListeners, int layerIndex, org.nd4j.linalg.api.ndarray.INDArray layerParamsView, boolean initializeParams)
instantiate
in class AbstractSameDiffLayer
Copyright © 2018. All rights reserved.