public class ReshapePreprocessor extends BaseInputPreProcessor
| Constructor and Description |
|---|
ReshapePreprocessor(long[] inputShape,
long[] targetShape,
boolean hasMiniBatchDimension) |
ReshapePreprocessor(long[] inputShape,
long[] targetShape,
boolean hasMiniBatchDimension,
DataFormat dataFormat) |
| Modifier and Type | Method and Description |
|---|---|
INDArray |
backprop(INDArray output,
int miniBatchSize,
LayerWorkspaceMgr workspaceMgr)
Reverse the preProcess during backprop.
|
InputType |
getOutputType(InputType inputType)
For a given type of input to this preprocessor, what is the type of the output?
|
INDArray |
preProcess(INDArray input,
int miniBatchSize,
LayerWorkspaceMgr workspaceMgr)
Pre preProcess input/activations for a multi layer network
|
clone, feedForwardMaskArraypublic ReshapePreprocessor(long[] inputShape,
long[] targetShape,
boolean hasMiniBatchDimension)
inputShape - Input shape, with or without leading minibatch dimension, depending on value of hasMiniBatchDimensiontargetShape - Target shape, with or without leading minibatch dimension, depending on value of hasMiniBatchDimensionhasMiniBatchDimension - If true: shapes should be of the form [minibatch, x, y, ...]; if false: shapes should be of form [x, y, ...]public ReshapePreprocessor(long[] inputShape,
long[] targetShape,
boolean hasMiniBatchDimension,
DataFormat dataFormat)
inputShape - Input shape, with or without leading minibatch dimension, depending on value of hasMiniBatchDimensiontargetShape - Target shape, with or without leading minibatch dimension, depending on value of hasMiniBatchDimensionhasMiniBatchDimension - If true: shapes should be of the form [minibatch, x, y, ...]; if false: shapes should be of form [x, y, ...]dataFormat - May be null. If non-null:public INDArray preProcess(INDArray input, int miniBatchSize, LayerWorkspaceMgr workspaceMgr)
InputPreProcessorinput - the input to pre preProcessminiBatchSize - Minibatch sizeworkspaceMgr - Workspace managerArrayType.ACTIVATIONS workspace via the workspace managerpublic INDArray backprop(INDArray output, int miniBatchSize, LayerWorkspaceMgr workspaceMgr)
InputPreProcessoroutput - which is a pair of the gradient and epsilonminiBatchSize - Minibatch sizeworkspaceMgr - Workspace managerArrayType.ACTIVATION_GRAD workspace via the
workspace managerpublic InputType getOutputType(InputType inputType) throws InvalidInputTypeException
InputPreProcessorinputType - Type of input for the preprocessorInvalidInputTypeExceptionCopyright © 2022. All rights reserved.