public class AutoEncoder extends BasePretrainNetwork<AutoEncoder>
Layer.TrainingMode, Layer.Type
gradient, gradientsFlattened, gradientViews, optimizer, params, paramsFlattened, score, solver, weightNoiseParams
cacheMode, conf, dataType, dropoutApplied, epochCount, index, input, inputModificationAllowed, iterationCount, maskArray, maskState, preOutput, trainingListeners
Constructor and Description |
---|
AutoEncoder(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
|
INDArray |
activate(INDArray input,
boolean training,
LayerWorkspaceMgr workspaceMgr)
Perform forward pass and return the activations array with the specified input
|
void |
computeGradientAndScore(LayerWorkspaceMgr workspaceMgr)
Update the score
|
INDArray |
decode(INDArray y,
LayerWorkspaceMgr workspaceMgr) |
INDArray |
encode(INDArray v,
boolean training,
LayerWorkspaceMgr workspaceMgr) |
boolean |
isPretrainLayer()
Returns true if the layer can be trained in an unsupervised/pretrain manner (AE, VAE, etc)
|
Pair<INDArray,INDArray> |
sampleHiddenGivenVisible(INDArray v)
Sample the hidden distribution given the visible
|
Pair<INDArray,INDArray> |
sampleVisibleGivenHidden(INDArray h)
Sample the visible distribution given the hidden
|
backpropGradient, calcRegularizationScore, createGradient, getCorruptedInput, numParams, numParams, params, paramTable, setParams, setScoreWithZ
clear, clearNoiseWeightParams, clone, fit, fit, getGradientsViewArray, getOptimizer, getParam, getParamWithNoise, gradient, hasBias, hasLayerNorm, layerConf, paramTable, preOutput, preOutputWithPreNorm, score, setBackpropGradientsViewArray, setParam, setParams, setParamsViewArray, setParamTable, toString, update, update
addListeners, allowInputModification, applyConstraints, applyDropOutIfNecessary, applyMask, assertInputSet, backpropDropOutIfPresent, batchSize, close, conf, feedForwardMaskArray, getConfig, getEpochCount, getHelper, getIndex, getInput, getInputMiniBatchSize, getListeners, getMaskArray, gradientAndScore, init, input, layerId, setCacheMode, setConf, setEpochCount, setIndex, setInput, setInputMiniBatchSize, setListeners, setListeners, setMaskArray, type, updaterDivideByMinibatch
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getIterationCount, setIterationCount
public AutoEncoder(NeuralNetConfiguration conf, DataType dataType)
public Pair<INDArray,INDArray> sampleHiddenGivenVisible(INDArray v)
BasePretrainNetwork
sampleHiddenGivenVisible
in class BasePretrainNetwork<AutoEncoder>
v
- the visible to sample frompublic Pair<INDArray,INDArray> sampleVisibleGivenHidden(INDArray h)
BasePretrainNetwork
sampleVisibleGivenHidden
in class BasePretrainNetwork<AutoEncoder>
h
- the hidden to sample frompublic INDArray encode(INDArray v, boolean training, LayerWorkspaceMgr workspaceMgr)
public INDArray decode(INDArray y, LayerWorkspaceMgr workspaceMgr)
public INDArray activate(INDArray input, boolean training, LayerWorkspaceMgr workspaceMgr)
Layer
activate
in interface Layer
activate
in class AbstractLayer<AutoEncoder>
input
- the input to usetraining
- train or test modeworkspaceMgr
- Workspace manager.ArrayType.ACTIVATIONS
workspace via the workspace managerpublic boolean isPretrainLayer()
Layer
public INDArray activate(boolean training, LayerWorkspaceMgr workspaceMgr)
Layer
activate
in interface Layer
activate
in class BaseLayer<AutoEncoder>
training
- training or test modeworkspaceMgr
- Workspace managerArrayType.ACTIVATIONS
workspace via the workspace managerpublic void computeGradientAndScore(LayerWorkspaceMgr workspaceMgr)
Model
computeGradientAndScore
in interface Model
computeGradientAndScore
in class BaseLayer<AutoEncoder>
Copyright © 2021. All rights reserved.