Class SeparableConvolution2D.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<SeparableConvolution2D.Builder>
-
- org.deeplearning4j.nn.conf.layers.SeparableConvolution2D.Builder
-
- Enclosing class:
- SeparableConvolution2D
public static class SeparableConvolution2D.Builder extends ConvolutionLayer.BaseConvBuilder<SeparableConvolution2D.Builder>
-
-
Field Summary
Fields Modifier and Type Field Description protected CNN2DFormatdataFormatprotected intdepthMultiplierSet channels multiplier of channels-wise step in separable convolutionprotected List<LayerConstraint>pointWiseConstraintsSet constraints to be applied to the point-wise convolution weight parameters of this layer.-
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 booleanallowCausal()SeparableConvolution2Dbuild()SeparableConvolution2D.BuilderconstrainPointWise(LayerConstraint... constraints)Set constraints to be applied to the point-wise convolution weight parameters of this layer.SeparableConvolution2D.BuilderdataFormat(CNN2DFormat format)Set the data format for the CNN activations - NCHW (channels first) or NHWC (channels last).SeparableConvolution2D.BuilderdepthMultiplier(int depthMultiplier)Set channels multiplier of channels-wise step in separable convolutionSeparableConvolution2D.BuilderkernelSize(int... kernelSize)Size of the convolution rows/columns (height/width)SeparableConvolution2D.Builderpadding(int... padding)Padding - rows/columns (height/width)voidsetKernelSize(int... kernelSize)voidsetPadding(int... padding)voidsetStride(int... stride)SeparableConvolution2D.Builderstride(int... stride)Stride of the convolution rows/columns (height/width)-
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 of channels-wise step in separable convolution
-
dataFormat
protected CNN2DFormat dataFormat
-
pointWiseConstraints
protected List<LayerConstraint> pointWiseConstraints
Set constraints to be applied to the point-wise convolution weight parameters of this layer. Default: no constraints.
Constraints can be used to enforce certain conditions (non-negativity of parameters, max-norm regularization, etc). These constraints are applied at each iteration, after the parameters have been updated.
-
-
Method Detail
-
allowCausal
protected boolean allowCausal()
- Specified by:
allowCausalin classConvolutionLayer.BaseConvBuilder<SeparableConvolution2D.Builder>
-
dataFormat
public SeparableConvolution2D.Builder dataFormat(CNN2DFormat format)
Set the data format for the CNN activations - NCHW (channels first) or NHWC (channels last). SeeCNN2DFormatfor more details.
Default: NCHW- Parameters:
format- Format for activations (in and out)
-
depthMultiplier
public SeparableConvolution2D.Builder depthMultiplier(int depthMultiplier)
Set channels multiplier of channels-wise step in separable convolution- Parameters:
depthMultiplier- integer value, for each input map we get depthMultipler outputs in channels-wise step.- Returns:
- Builder
-
constrainPointWise
public SeparableConvolution2D.Builder constrainPointWise(LayerConstraint... constraints)
Set constraints to be applied to the point-wise convolution weight parameters of this layer. Default: no constraints.
Constraints can be used to enforce certain conditions (non-negativity of parameters, max-norm regularization, etc). These constraints are applied at each iteration, after the parameters have been updated.- Parameters:
constraints- Constraints to apply to the point-wise convolution parameters of this layer
-
kernelSize
public SeparableConvolution2D.Builder kernelSize(int... kernelSize)
Size of the convolution rows/columns (height/width)- Overrides:
kernelSizein classConvolutionLayer.BaseConvBuilder<SeparableConvolution2D.Builder>- Parameters:
kernelSize- the height and width of the kernel
-
stride
public SeparableConvolution2D.Builder stride(int... stride)
Stride of the convolution rows/columns (height/width)- Overrides:
stridein classConvolutionLayer.BaseConvBuilder<SeparableConvolution2D.Builder>- Parameters:
stride- the stride of the kernel (in h/w dimensions)
-
padding
public SeparableConvolution2D.Builder padding(int... padding)
Padding - rows/columns (height/width)- Overrides:
paddingin classConvolutionLayer.BaseConvBuilder<SeparableConvolution2D.Builder>- Parameters:
padding- the padding in h/w dimensions
-
setKernelSize
public void setKernelSize(int... kernelSize)
-
setStride
public void setStride(int... stride)
-
setPadding
public void setPadding(int... padding)
-
build
public SeparableConvolution2D build()
- Specified by:
buildin classLayer.Builder<SeparableConvolution2D.Builder>
-
-