public class AutoEncoder extends BasePretrainNetwork<AutoEncoder>
Layer.TrainingMode, Layer.Type
trainingListeners
conf, dropoutApplied, dropoutMask, gradient, gradientsFlattened, gradientViews, index, input, iterationListeners, maskArray, maskState, optimizer, params, paramsFlattened, score, solver
Constructor and Description |
---|
AutoEncoder(NeuralNetConfiguration conf) |
AutoEncoder(NeuralNetConfiguration conf,
org.nd4j.linalg.api.ndarray.INDArray input) |
Modifier and Type | Method and Description |
---|---|
org.nd4j.linalg.api.ndarray.INDArray |
activate()
Trigger an activation with the last specified input
|
org.nd4j.linalg.api.ndarray.INDArray |
activate(boolean training)
Trigger an activation with the last specified input
|
org.nd4j.linalg.api.ndarray.INDArray |
activate(org.nd4j.linalg.api.ndarray.INDArray input)
Initialize the layer with the given input
and return the activation for this layer
given this input
|
org.nd4j.linalg.api.ndarray.INDArray |
activate(org.nd4j.linalg.api.ndarray.INDArray input,
boolean training)
Initialize the layer with the given input
and return the activation for this layer
given this input
|
void |
computeGradientAndScore()
Update the score
|
org.nd4j.linalg.api.ndarray.INDArray |
decode(org.nd4j.linalg.api.ndarray.INDArray y) |
org.nd4j.linalg.api.ndarray.INDArray |
encode(org.nd4j.linalg.api.ndarray.INDArray v,
boolean training) |
boolean |
isPretrainLayer()
Returns true if the layer can be trained in an unsupervised/pretrain manner (VAE, RBMs etc)
|
Pair<org.nd4j.linalg.api.ndarray.INDArray,org.nd4j.linalg.api.ndarray.INDArray> |
sampleHiddenGivenVisible(org.nd4j.linalg.api.ndarray.INDArray v)
Sample the hidden distribution given the visible
|
Pair<org.nd4j.linalg.api.ndarray.INDArray,org.nd4j.linalg.api.ndarray.INDArray> |
sampleVisibleGivenHidden(org.nd4j.linalg.api.ndarray.INDArray h)
Sample the visible distribution given the hidden
|
backpropGradient, calcL1, calcL2, createGradient, getCorruptedInput, numParams, numParams, params, paramTable, setListeners, setListeners, setParams, setScoreWithZ
accumulateScore, activate, activate, activationMean, applyDropOutIfNecessary, applyLearningRateScoreDecay, applyMask, batchSize, calcGradient, clear, clone, conf, createGradient, derivativeActivation, error, feedForwardMaskArray, fit, fit, getIndex, getInput, getInputMiniBatchSize, getListeners, getMaskArray, getOptimizer, getParam, gradient, gradientAndScore, init, initParams, input, iterate, layerConf, layerNameAndIndex, merge, paramTable, preOutput, preOutput, preOutput, preOutput, score, setBackpropGradientsViewArray, setConf, setIndex, setInput, setInputMiniBatchSize, setMaskArray, setParam, setParams, setParamsViewArray, setParamTable, toString, transpose, type, update, update, validateInput
public AutoEncoder(NeuralNetConfiguration conf)
public AutoEncoder(NeuralNetConfiguration conf, org.nd4j.linalg.api.ndarray.INDArray input)
public Pair<org.nd4j.linalg.api.ndarray.INDArray,org.nd4j.linalg.api.ndarray.INDArray> sampleHiddenGivenVisible(org.nd4j.linalg.api.ndarray.INDArray v)
BasePretrainNetwork
sampleHiddenGivenVisible
in class BasePretrainNetwork<AutoEncoder>
v
- the visible to sample frompublic Pair<org.nd4j.linalg.api.ndarray.INDArray,org.nd4j.linalg.api.ndarray.INDArray> sampleVisibleGivenHidden(org.nd4j.linalg.api.ndarray.INDArray h)
BasePretrainNetwork
sampleVisibleGivenHidden
in class BasePretrainNetwork<AutoEncoder>
h
- the hidden to sample frompublic org.nd4j.linalg.api.ndarray.INDArray encode(org.nd4j.linalg.api.ndarray.INDArray v, boolean training)
public org.nd4j.linalg.api.ndarray.INDArray decode(org.nd4j.linalg.api.ndarray.INDArray y)
public org.nd4j.linalg.api.ndarray.INDArray activate(org.nd4j.linalg.api.ndarray.INDArray input, boolean training)
Layer
activate
in interface Layer
activate
in class BaseLayer<AutoEncoder>
input
- the input to usetraining
- train or test modepublic org.nd4j.linalg.api.ndarray.INDArray activate(org.nd4j.linalg.api.ndarray.INDArray input)
Layer
activate
in interface Layer
activate
in class BaseLayer<AutoEncoder>
input
- the input to usepublic boolean isPretrainLayer()
Layer
public org.nd4j.linalg.api.ndarray.INDArray activate(boolean training)
Layer
activate
in interface Layer
activate
in class BaseLayer<AutoEncoder>
training
- training or test modepublic org.nd4j.linalg.api.ndarray.INDArray activate()
Layer
activate
in interface Layer
activate
in class BaseLayer<AutoEncoder>
public void computeGradientAndScore()
Model
computeGradientAndScore
in interface Model
computeGradientAndScore
in class BaseLayer<AutoEncoder>