Class MKLDNNBatchNormHelper
- java.lang.Object
-
- org.deeplearning4j.nn.layers.mkldnn.MKLDNNBatchNormHelper
-
- All Implemented Interfaces:
LayerHelper,BatchNormalizationHelper
public class MKLDNNBatchNormHelper extends Object implements BatchNormalizationHelper
-
-
Constructor Summary
Constructors Constructor Description MKLDNNBatchNormHelper(DataType dataType)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Pair<Gradient,INDArray>backpropGradient(INDArray input, INDArray epsilon, long[] shape, INDArray gamma, INDArray beta, INDArray dGammaView, INDArray dBetaView, double eps, CNN2DFormat format, LayerWorkspaceMgr workspaceMgr)booleancheckSupported()booleancheckSupported(double eps, boolean fixedGammaBeta)INDArraygetMeanCache(DataType dataType)INDArraygetVarCache(DataType dataType)Map<String,Long>helperMemoryUse()Return the currently allocated memory for the helper.
(a) Excludes: any shared memory used by multiple helpers/layers
(b) Excludes any temporary memory (c) Includes all memory that persists for longer than the helper method
This is mainly used for debugging and reporting purposes.INDArraypreOutput(INDArray x, boolean training, long[] shape, INDArray gamma, INDArray beta, INDArray mean, INDArray var, double decay, double eps, CNN2DFormat format, LayerWorkspaceMgr workspaceMgr)
-
-
-
Field Detail
-
context
protected OpContext context
-
-
Constructor Detail
-
MKLDNNBatchNormHelper
public MKLDNNBatchNormHelper(DataType dataType)
-
-
Method Detail
-
checkSupported
public boolean checkSupported(double eps, boolean fixedGammaBeta)- Specified by:
checkSupportedin interfaceBatchNormalizationHelper
-
backpropGradient
public Pair<Gradient,INDArray> backpropGradient(INDArray input, INDArray epsilon, long[] shape, INDArray gamma, INDArray beta, INDArray dGammaView, INDArray dBetaView, double eps, CNN2DFormat format, LayerWorkspaceMgr workspaceMgr)
- Specified by:
backpropGradientin interfaceBatchNormalizationHelper
-
preOutput
public INDArray preOutput(INDArray x, boolean training, long[] shape, INDArray gamma, INDArray beta, INDArray mean, INDArray var, double decay, double eps, CNN2DFormat format, LayerWorkspaceMgr workspaceMgr)
- Specified by:
preOutputin interfaceBatchNormalizationHelper
-
getMeanCache
public INDArray getMeanCache(DataType dataType)
- Specified by:
getMeanCachein interfaceBatchNormalizationHelper
-
getVarCache
public INDArray getVarCache(DataType dataType)
- Specified by:
getVarCachein interfaceBatchNormalizationHelper
-
helperMemoryUse
public Map<String,Long> helperMemoryUse()
Description copied from interface:LayerHelperReturn the currently allocated memory for the helper.
(a) Excludes: any shared memory used by multiple helpers/layers
(b) Excludes any temporary memory (c) Includes all memory that persists for longer than the helper method
This is mainly used for debugging and reporting purposes. Returns a map:
Key: The name of the type of memory
Value: The amount of memory- Specified by:
helperMemoryUsein interfaceLayerHelper- Returns:
- Map of memory, may be null if none is used.
-
checkSupported
public boolean checkSupported()
- Specified by:
checkSupportedin interfaceLayerHelper
-
-