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 OpContextcontextprotected OpContextcontextBwd
-
Constructor Summary
Constructors Constructor Description MKLDNNConvHelper(DataType dataType)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description INDArrayactivate(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)booleancheckSupported()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 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:
checkSupportedin interfaceConvolutionHelper- Specified by:
checkSupportedin 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:
backpropGradientin 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:
preOutputin interfaceConvolutionHelper
-
activate
public INDArray activate(INDArray z, IActivation afn, boolean training)
- Specified by:
activatein interfaceConvolutionHelper
-
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.
-
-