T
- the type of Convolution
block to buildpublic abstract static class Convolution.ConvolutionBuilder<T extends Convolution.ConvolutionBuilder>
extends java.lang.Object
Convolution
block.Modifier and Type | Field and Description |
---|---|
protected Shape |
dilate |
protected boolean |
includeBias |
protected Shape |
kernel |
protected int |
numFilters |
protected int |
numGroups |
protected Shape |
pad |
protected Shape |
stride |
Constructor and Description |
---|
ConvolutionBuilder() |
Modifier and Type | Method and Description |
---|---|
T |
optBias(boolean includeBias)
Sets the optional parameter of whether to include a bias vector.
|
T |
optDilate(Shape dilate)
Sets the dilation along each dimension.
|
T |
optNumGroups(int numGroups)
Sets the number of group partitions.
|
T |
optPad(Shape pad)
Sets the padding along each dimension.
|
T |
optStride(Shape stride)
Sets the stride of the convolution.
|
protected abstract T |
self() |
T |
setKernel(Shape kernel)
Sets the shape of the kernel.
|
T |
setNumFilters(int numFilters)
Sets the Required number of filters.
|
protected void |
validate()
Validates that the required arguments are set.
|
protected Shape kernel
protected Shape stride
protected Shape pad
protected Shape dilate
protected int numFilters
protected int numGroups
protected boolean includeBias
public T setKernel(Shape kernel)
kernel
- the shape of the kernelpublic T optStride(Shape stride)
stride
- the shape of the stridepublic T optPad(Shape pad)
pad
- the shape of padding along each dimensionpublic T optDilate(Shape dilate)
dilate
- the shape of dilation along each dimensionpublic T setNumFilters(int numFilters)
numFilters
- the number of convolution filters(channels)public T optNumGroups(int numGroups)
numGroups
- the number of group partitionspublic T optBias(boolean includeBias)
includeBias
- whether to use a bias vector parameterprotected void validate()
java.lang.IllegalArgumentException
- if the required arguments are not setprotected abstract T self()