Class MKLDNNConvHelper
- java.lang.Object
-
- org.deeplearning4j.nn.layers.mkldnn.MKLDNNConvHelper
-
- All Implemented Interfaces:
ConvolutionHelper
,LayerHelper
public class MKLDNNConvHelper extends Object implements ConvolutionHelper
-
-
Field Summary
Fields Modifier and Type Field Description protected OpContext
context
protected OpContext
contextBwd
-
Constructor Summary
Constructors Constructor Description MKLDNNConvHelper(DataType dataType)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description INDArray
activate(INDArray z, IActivation afn, boolean training)
Pair<Gradient,INDArray>
backpropGradient(INDArray input, INDArray weights, INDArray bias, INDArray delta, int[] kernel, int[] strides, int[] pad, INDArray biasGradView, INDArray weightGradView, IActivation afn, ConvolutionLayer.AlgoMode mode, ConvolutionLayer.BwdFilterAlgo bwdFilterAlgo, ConvolutionLayer.BwdDataAlgo bwdDataAlgo, ConvolutionMode convolutionMode, int[] dilation, CNN2DFormat format, LayerWorkspaceMgr workspaceMgr)
boolean
checkSupported()
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 input, INDArray weights, INDArray bias, int[] kernel, int[] strides, int[] pad, ConvolutionLayer.AlgoMode mode, ConvolutionLayer.FwdAlgo fwdAlgo, ConvolutionMode convolutionMode, int[] dilation, CNN2DFormat format, LayerWorkspaceMgr workspaceMgr)
-
-
-
Constructor Detail
-
MKLDNNConvHelper
public MKLDNNConvHelper(DataType dataType)
-
-
Method Detail
-
checkSupported
public boolean checkSupported()
- Specified by:
checkSupported
in interfaceConvolutionHelper
- Specified by:
checkSupported
in interfaceLayerHelper
-
backpropGradient
public Pair<Gradient,INDArray> backpropGradient(INDArray input, INDArray weights, INDArray bias, INDArray delta, int[] kernel, int[] strides, int[] pad, INDArray biasGradView, INDArray weightGradView, IActivation afn, ConvolutionLayer.AlgoMode mode, ConvolutionLayer.BwdFilterAlgo bwdFilterAlgo, ConvolutionLayer.BwdDataAlgo bwdDataAlgo, ConvolutionMode convolutionMode, int[] dilation, CNN2DFormat format, LayerWorkspaceMgr workspaceMgr)
- Specified by:
backpropGradient
in interfaceConvolutionHelper
-
preOutput
public INDArray preOutput(INDArray input, INDArray weights, INDArray bias, int[] kernel, int[] strides, int[] pad, ConvolutionLayer.AlgoMode mode, ConvolutionLayer.FwdAlgo fwdAlgo, ConvolutionMode convolutionMode, int[] dilation, CNN2DFormat format, LayerWorkspaceMgr workspaceMgr)
- Specified by:
preOutput
in interfaceConvolutionHelper
-
activate
public INDArray activate(INDArray z, IActivation afn, boolean training)
- Specified by:
activate
in interfaceConvolutionHelper
-
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.
-
-