public class ZeroPaddingLayer extends AbstractLayer<ZeroPaddingLayer>
Layer.TrainingMode, Layer.Type
cacheMode, conf, dataType, dropoutApplied, epochCount, index, input, inputModificationAllowed, iterationCount, maskArray, maskState, preOutput, trainingListeners
Constructor and Description |
---|
ZeroPaddingLayer(NeuralNetConfiguration conf,
DataType dataType) |
Modifier and Type | Method and Description |
---|---|
INDArray |
activate(boolean training,
LayerWorkspaceMgr workspaceMgr)
Perform forward pass and return the activations array with the last set input
|
Pair<Gradient,INDArray> |
backpropGradient(INDArray epsilon,
LayerWorkspaceMgr workspaceMgr)
Calculate the gradient relative to the error in the next layer
|
double |
calcRegularizationScore(boolean backpropParamsOnly)
Calculate the regularization component of the score, for the parameters in this layer
For example, the L1, L2 and/or weight decay components of the loss function |
void |
clearNoiseWeightParams() |
Layer |
clone() |
boolean |
isPretrainLayer()
Returns true if the layer can be trained in an unsupervised/pretrain manner (AE, VAE, etc)
|
Layer.Type |
type()
Returns the layer type
|
activate, addListeners, allowInputModification, applyConstraints, applyDropOutIfNecessary, applyMask, assertInputSet, backpropDropOutIfPresent, batchSize, clear, close, computeGradientAndScore, conf, feedForwardMaskArray, fit, fit, getConfig, getEpochCount, getGradientsViewArray, getHelper, getIndex, getInput, getInputMiniBatchSize, getListeners, getMaskArray, getOptimizer, getParam, gradient, gradientAndScore, init, input, layerConf, layerId, numParams, numParams, params, paramTable, paramTable, score, setBackpropGradientsViewArray, setCacheMode, setConf, setEpochCount, setIndex, setInput, setInputMiniBatchSize, setListeners, setListeners, setMaskArray, setParam, setParams, setParams, setParamsViewArray, setParamTable, update, update, updaterDivideByMinibatch
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getIterationCount, setIterationCount
public ZeroPaddingLayer(NeuralNetConfiguration conf, DataType dataType)
public boolean isPretrainLayer()
Layer
public void clearNoiseWeightParams()
public Layer.Type type()
Layer
type
in interface Layer
type
in class AbstractLayer<ZeroPaddingLayer>
public Pair<Gradient,INDArray> backpropGradient(INDArray epsilon, LayerWorkspaceMgr workspaceMgr)
Layer
epsilon
- w^(L+1)*delta^(L+1). Or, equiv: dC/da, i.e., (dC/dz)*(dz/da) = dC/da, where C
is cost function a=sigma(z) is activation.workspaceMgr
- Workspace managerArrayType.ACTIVATION_GRAD
workspace via the workspace managerpublic INDArray activate(boolean training, LayerWorkspaceMgr workspaceMgr)
Layer
training
- training or test modeworkspaceMgr
- Workspace managerArrayType.ACTIVATIONS
workspace via the workspace managerpublic double calcRegularizationScore(boolean backpropParamsOnly)
Layer
calcRegularizationScore
in interface Layer
calcRegularizationScore
in class AbstractLayer<ZeroPaddingLayer>
backpropParamsOnly
- If true: calculate regularization score based on backprop params only. If false: calculate
based on all params (including pretrain params, if any)Copyright © 2021. All rights reserved.