Class DepthwiseConvolution2D.Builder
- java.lang.Object
-
- org.deeplearning4j.nn.conf.layers.Layer.Builder<T>
-
- org.deeplearning4j.nn.conf.layers.BaseLayer.Builder<T>
-
- org.deeplearning4j.nn.conf.layers.FeedForwardLayer.Builder<T>
-
- org.deeplearning4j.nn.conf.layers.ConvolutionLayer.BaseConvBuilder<DepthwiseConvolution2D.Builder>
-
- org.deeplearning4j.nn.conf.layers.DepthwiseConvolution2D.Builder
-
- Enclosing class:
- DepthwiseConvolution2D
public static class DepthwiseConvolution2D.Builder extends ConvolutionLayer.BaseConvBuilder<DepthwiseConvolution2D.Builder>
-
-
Field Summary
Fields Modifier and Type Field Description protected CNN2DFormat
cnn2DFormat
protected int
depthMultiplier
Set channels multiplier for depth-wise convolution-
Fields inherited from class org.deeplearning4j.nn.conf.layers.ConvolutionLayer.BaseConvBuilder
convolutionDim, convolutionMode, cudnnAlgoMode, cudnnAllowFallback, cudnnBwdDataAlgo, cudnnBwdFilterAlgo, cudnnFwdAlgo, dilation, hasBias, kernelSize, padding, stride
-
Fields inherited from class org.deeplearning4j.nn.conf.layers.FeedForwardLayer.Builder
nIn, nOut
-
Fields inherited from class org.deeplearning4j.nn.conf.layers.BaseLayer.Builder
activationFn, biasInit, biasUpdater, gainInit, gradientNormalization, gradientNormalizationThreshold, iupdater, regularization, regularizationBias, weightInitFn, weightNoise
-
Fields inherited from class org.deeplearning4j.nn.conf.layers.Layer.Builder
allParamConstraints, biasConstraints, iDropout, layerName, weightConstraints
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected boolean
allowCausal()
DepthwiseConvolution2D
build()
DepthwiseConvolution2D.Builder
dataFormat(CNN2DFormat format)
Set the data format for the CNN activations - NCHW (channels first) or NHWC (channels last).DepthwiseConvolution2D.Builder
depthMultiplier(int depthMultiplier)
Set channels multiplier for depth-wise convolutionDepthwiseConvolution2D.Builder
kernelSize(int... kernelSize)
Size of the convolution rows/columnsDepthwiseConvolution2D.Builder
padding(int... padding)
Padding of the convolution in rows/columns (height/width) dimensionsvoid
setDilation(int... dilation)
void
setKernelSize(int... kernelSize)
void
setPadding(int... padding)
void
setStride(int... stride)
DepthwiseConvolution2D.Builder
stride(int... stride)
Stride of the convolution in rows/columns (height/width) dimensions-
Methods inherited from class org.deeplearning4j.nn.conf.layers.ConvolutionLayer.BaseConvBuilder
convolutionMode, cudnnAlgoMode, cudnnAllowFallback, cudnnBwdDataMode, cudnnBwdFilterMode, cudnnFwdMode, dilation, hasBias, helperAllowFallback, setConvolutionMode
-
Methods inherited from class org.deeplearning4j.nn.conf.layers.FeedForwardLayer.Builder
nIn, nIn, nOut, nOut, units
-
Methods inherited from class org.deeplearning4j.nn.conf.layers.BaseLayer.Builder
activation, activation, biasInit, biasUpdater, dist, gainInit, gradientNormalization, gradientNormalizationThreshold, l1, l1Bias, l2, l2Bias, regularization, regularizationBias, updater, updater, weightDecay, weightDecay, weightDecayBias, weightDecayBias, weightInit, weightInit, weightInit, weightNoise
-
Methods inherited from class org.deeplearning4j.nn.conf.layers.Layer.Builder
constrainAllParameters, constrainBias, constrainWeights, dropOut, dropOut, name
-
-
-
-
Field Detail
-
depthMultiplier
protected int depthMultiplier
Set channels multiplier for depth-wise convolution
-
cnn2DFormat
protected CNN2DFormat cnn2DFormat
-
-
Method Detail
-
allowCausal
protected boolean allowCausal()
- Specified by:
allowCausal
in classConvolutionLayer.BaseConvBuilder<DepthwiseConvolution2D.Builder>
-
dataFormat
public DepthwiseConvolution2D.Builder dataFormat(CNN2DFormat format)
Set the data format for the CNN activations - NCHW (channels first) or NHWC (channels last). SeeCNN2DFormat
for more details.
Default: NCHW- Parameters:
format
- Format for activations (in and out)
-
depthMultiplier
public DepthwiseConvolution2D.Builder depthMultiplier(int depthMultiplier)
Set channels multiplier for depth-wise convolution- Parameters:
depthMultiplier
- integer value, for each input map we get depthMultiplier outputs in channels-wise step.- Returns:
- Builder
-
kernelSize
public DepthwiseConvolution2D.Builder kernelSize(int... kernelSize)
Size of the convolution rows/columns- Overrides:
kernelSize
in classConvolutionLayer.BaseConvBuilder<DepthwiseConvolution2D.Builder>
- Parameters:
kernelSize
- the height and width of the kernel
-
stride
public DepthwiseConvolution2D.Builder stride(int... stride)
Stride of the convolution in rows/columns (height/width) dimensions- Overrides:
stride
in classConvolutionLayer.BaseConvBuilder<DepthwiseConvolution2D.Builder>
- Parameters:
stride
- Stride of the layer
-
padding
public DepthwiseConvolution2D.Builder padding(int... padding)
Padding of the convolution in rows/columns (height/width) dimensions- Overrides:
padding
in classConvolutionLayer.BaseConvBuilder<DepthwiseConvolution2D.Builder>
- Parameters:
padding
- Padding of the layer
-
setKernelSize
public void setKernelSize(int... kernelSize)
-
setStride
public void setStride(int... stride)
-
setPadding
public void setPadding(int... padding)
-
setDilation
public void setDilation(int... dilation)
-
build
public DepthwiseConvolution2D build()
- Specified by:
build
in classLayer.Builder<DepthwiseConvolution2D.Builder>
-
-