Class CnnToFeedForwardPreProcessor
- java.lang.Object
-
- org.deeplearning4j.nn.conf.preprocessor.CnnToFeedForwardPreProcessor
-
- All Implemented Interfaces:
Serializable,Cloneable,InputPreProcessor
public class CnnToFeedForwardPreProcessor extends Object implements InputPreProcessor
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected CNN2DFormatformatprotected longinputHeightprotected longinputWidthprotected longnumChannels
-
Constructor Summary
Constructors Constructor Description CnnToFeedForwardPreProcessor()CnnToFeedForwardPreProcessor(long inputHeight, long inputWidth)CnnToFeedForwardPreProcessor(long inputHeight, long inputWidth, long numChannels)CnnToFeedForwardPreProcessor(long inputHeight, long inputWidth, long numChannels, CNN2DFormat format)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description INDArraybackprop(INDArray epsilons, int miniBatchSize, LayerWorkspaceMgr workspaceMgr)Reverse the preProcess during backprop.CnnToFeedForwardPreProcessorclone()Pair<INDArray,MaskState>feedForwardMaskArray(INDArray maskArray, MaskState currentMaskState, int minibatchSize)InputTypegetOutputType(InputType inputType)For a given type of input to this preprocessor, what is the type of the output?INDArraypreProcess(INDArray input, int miniBatchSize, LayerWorkspaceMgr workspaceMgr)Pre preProcess input/activations for a multi layer network
-
-
-
Field Detail
-
inputHeight
protected long inputHeight
-
inputWidth
protected long inputWidth
-
numChannels
protected long numChannels
-
format
protected CNN2DFormat format
-
-
Constructor Detail
-
CnnToFeedForwardPreProcessor
public CnnToFeedForwardPreProcessor(long inputHeight, long inputWidth, long numChannels, CNN2DFormat format)- Parameters:
inputHeight- the columnsinputWidth- the rowsnumChannels- the channels
-
CnnToFeedForwardPreProcessor
public CnnToFeedForwardPreProcessor(long inputHeight, long inputWidth)
-
CnnToFeedForwardPreProcessor
public CnnToFeedForwardPreProcessor(long inputHeight, long inputWidth, long numChannels)
-
CnnToFeedForwardPreProcessor
public CnnToFeedForwardPreProcessor()
-
-
Method Detail
-
preProcess
public INDArray preProcess(INDArray input, int miniBatchSize, LayerWorkspaceMgr workspaceMgr)
Description copied from interface:InputPreProcessorPre preProcess input/activations for a multi layer network- Specified by:
preProcessin interfaceInputPreProcessor- Parameters:
input- the input to pre preProcessminiBatchSize- Minibatch sizeworkspaceMgr- Workspace manager- Returns:
- the processed input. Note that the returned array should be placed in the
ArrayType.ACTIVATIONSworkspace via the workspace manager
-
backprop
public INDArray backprop(INDArray epsilons, int miniBatchSize, LayerWorkspaceMgr workspaceMgr)
Description copied from interface:InputPreProcessorReverse the preProcess during backprop. Process Gradient/epsilons before passing them to the layer below.- Specified by:
backpropin interfaceInputPreProcessor- Parameters:
epsilons- which is a pair of the gradient and epsilonminiBatchSize- Minibatch sizeworkspaceMgr- Workspace manager- Returns:
- the reverse of the pre preProcess step (if any). Note that the returned array should be
placed in
ArrayType.ACTIVATION_GRADworkspace via the workspace manager
-
clone
public CnnToFeedForwardPreProcessor clone()
- Specified by:
clonein interfaceInputPreProcessor- Overrides:
clonein classObject
-
getOutputType
public InputType getOutputType(InputType inputType)
Description copied from interface:InputPreProcessorFor a given type of input to this preprocessor, what is the type of the output?- Specified by:
getOutputTypein interfaceInputPreProcessor- Parameters:
inputType- Type of input for the preprocessor- Returns:
- Type of input after applying the preprocessor
-
feedForwardMaskArray
public Pair<INDArray,MaskState> feedForwardMaskArray(INDArray maskArray, MaskState currentMaskState, int minibatchSize)
- Specified by:
feedForwardMaskArrayin interfaceInputPreProcessor
-
-