public class Upsampling1D extends Upsampling2D
Used for upsampling a 1D convolution. Currently derived from 2D version. For forward and backward pass we add a dummy dimension, apply the 2D version and strip the extra dimension again. Eventually, we will want to migrate to a proper 1D version without this overhead.
Layer.TrainingMode, Layer.Type
cacheMode, conf, dropoutApplied, dropoutMask, epochCount, index, input, iterationCount, iterationListeners, maskArray, maskState, preOutput
Constructor and Description |
---|
Upsampling1D(NeuralNetConfiguration conf) |
Upsampling1D(NeuralNetConfiguration conf,
org.nd4j.linalg.api.ndarray.INDArray input) |
Modifier and Type | Method and Description |
---|---|
org.nd4j.linalg.primitives.Pair<Gradient,org.nd4j.linalg.api.ndarray.INDArray> |
backpropGradient(org.nd4j.linalg.api.ndarray.INDArray epsilon)
Calculate the gradient relative to the error in the next layer
|
protected int |
getSize() |
org.nd4j.linalg.api.ndarray.INDArray |
preOutput(boolean training) |
org.nd4j.linalg.api.ndarray.INDArray |
preOutput(boolean training,
boolean forBackprop) |
accumulateScore, activate, calcL1, calcL2, clearNoiseWeightParams, clone, computeGradientAndScore, fit, fit, getParam, gradient, isPretrainLayer, iterate, numParams, params, score, setParams, transpose, type, update
activate, activate, activate, activate, activate, addListeners, applyConstraints, applyDropOutIfNecessary, applyMask, batchSize, clear, conf, feedForwardMaskArray, getGradientsViewArray, getIndex, getInput, getInputMiniBatchSize, getListeners, getMaskArray, getOptimizer, gradientAndScore, init, initParams, input, layerConf, layerId, migrateInput, numParams, paramTable, paramTable, preOutput, preOutput, preOutput, setBackpropGradientsViewArray, setCacheMode, setConf, setIndex, setInput, setInputMiniBatchSize, setListeners, setListeners, setMaskArray, setParam, setParams, setParamsViewArray, setParamTable, update, validateInput
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getEpochCount, getIterationCount, setEpochCount, setIterationCount
public Upsampling1D(NeuralNetConfiguration conf)
public Upsampling1D(NeuralNetConfiguration conf, org.nd4j.linalg.api.ndarray.INDArray input)
public org.nd4j.linalg.primitives.Pair<Gradient,org.nd4j.linalg.api.ndarray.INDArray> backpropGradient(org.nd4j.linalg.api.ndarray.INDArray epsilon)
Layer
backpropGradient
in interface Layer
backpropGradient
in class Upsampling2D
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.protected int getSize()
getSize
in class Upsampling2D
public org.nd4j.linalg.api.ndarray.INDArray preOutput(boolean training)
preOutput
in class Upsampling2D
public org.nd4j.linalg.api.ndarray.INDArray preOutput(boolean training, boolean forBackprop)
preOutput
in class Upsampling2D
Copyright © 2018. All rights reserved.