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)
boolean
checkSupported()
boolean
checkSupported(double eps, boolean fixedGammaBeta)
INDArray
getMeanCache(DataType dataType)
INDArray
getVarCache(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.INDArray
preOutput(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:
checkSupported
in 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:
backpropGradient
in 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:
preOutput
in interfaceBatchNormalizationHelper
-
getMeanCache
public INDArray getMeanCache(DataType dataType)
- Specified by:
getMeanCache
in interfaceBatchNormalizationHelper
-
getVarCache
public INDArray getVarCache(DataType dataType)
- Specified by:
getVarCache
in interfaceBatchNormalizationHelper
-
helperMemoryUse
public Map<String,Long> helperMemoryUse()
Description copied from interface:LayerHelper
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. Returns a map:
Key: The name of the type of memory
Value: The amount of memory- Specified by:
helperMemoryUse
in interfaceLayerHelper
- Returns:
- Map of memory, may be null if none is used.
-
checkSupported
public boolean checkSupported()
- Specified by:
checkSupported
in interfaceLayerHelper
-
-