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 |
dilation |
protected int |
filters |
protected int |
groups |
protected boolean |
includeBias |
protected Shape |
kernelShape |
protected Shape |
padding |
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 |
optDilation(Shape dilate)
Sets the dilation along each dimension.
|
T |
optGroups(int groups)
Sets the number of group partitions.
|
T |
optPadding(Shape padding)
Sets the padding along each dimension.
|
T |
optStride(Shape stride)
Sets the stride of the convolution.
|
protected abstract T |
self() |
T |
setFilters(int filters)
Sets the Required number of filters.
|
T |
setKernelShape(Shape kernelShape)
Sets the shape of the kernel.
|
protected void |
validate()
Validates that the required arguments are set.
|
protected Shape kernelShape
protected Shape stride
protected Shape padding
protected Shape dilation
protected int filters
protected int groups
protected boolean includeBias
public T setKernelShape(Shape kernelShape)
kernelShape - the shape of the kernelpublic T optStride(Shape stride)
stride - the shape of the stridepublic T optPadding(Shape padding)
padding - the shape of padding along each dimensionpublic T optDilation(Shape dilate)
dilate - the shape of dilation along each dimensionpublic T setFilters(int filters)
filters - the number of convolution filters(channels)public T optGroups(int groups)
groups - 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()