public static class PrimaryCapsules.Builder extends SameDiffLayer.Builder<PrimaryCapsules.Builder>
paramWeightInit, weightInit
biasUpdater, regularization, regularizationBias, updater
allParamConstraints, biasConstraints, iDropout, layerName, weightConstraints
Constructor and Description |
---|
Builder(int capsuleDimensions,
int channels) |
Builder(int capsuleDimensions,
int channels,
int[] kernelSize) |
Builder(int capsuleDimensions,
int channels,
int[] kernelSize,
int[] stride) |
Builder(int capsuleDimensions,
int channels,
int[] kernelSize,
int[] stride,
int[] padding) |
Builder(int capsuleDimensions,
int channels,
int[] kernelSize,
int[] stride,
int[] padding,
int[] dilation) |
Builder(int capsuleDimensions,
int channels,
int[] kernelSize,
int[] stride,
int[] padding,
int[] dilation,
ConvolutionMode convolutionMode) |
Modifier and Type | Method and Description |
---|---|
<E extends Layer> |
build() |
PrimaryCapsules.Builder |
capsuleDimensions(int capsuleDimensions)
Sets the number of dimensions to use in the capsules.
|
PrimaryCapsules.Builder |
capsules(int capsules)
Usually inferred automatically.
|
PrimaryCapsules.Builder |
channels(int channels)
Sets the number of channels to use in the 2d convolution.
|
PrimaryCapsules.Builder |
convolutionMode(ConvolutionMode convolutionMode)
The convolution mode to use in the 2d convolution
|
PrimaryCapsules.Builder |
dilation(int... dilation)
Sets the dilation of the 2d convolution
|
PrimaryCapsules.Builder |
hasBias(boolean hasBias) |
PrimaryCapsules.Builder |
kernelSize(int... kernelSize)
Sets the kernel size of the 2d convolution
|
PrimaryCapsules.Builder |
nOut(int nOut)
Sets the number of channels to use in the 2d convolution.
|
PrimaryCapsules.Builder |
padding(int... padding)
Sets the padding of the 2d convolution
|
void |
setDilation(int... dilation) |
void |
setKernelSize(int... kernelSize) |
void |
setPadding(int... padding) |
void |
setStride(int... stride) |
PrimaryCapsules.Builder |
stride(int... stride)
Sets the stride of the 2d convolution
|
PrimaryCapsules.Builder |
useLeakyReLU(double leak)
Use a LeakyReLU activation on the 2d convolution
|
PrimaryCapsules.Builder |
useReLU()
Use a ReLU activation on the 2d convolution
|
PrimaryCapsules.Builder |
useReLU(boolean useRelu)
Whether to use a ReLU activation on the 2d convolution
|
weightInit, weightInit
biasUpdater, l1, l1Bias, l2, l2Bias, regularization, regularizationBias, updater, weightDecay, weightDecay, weightDecayBias, weightDecayBias
constrainAllParameters, constrainBias, constrainWeights, dropOut, dropOut, name
public Builder(int capsuleDimensions, int channels, int[] kernelSize, int[] stride, int[] padding, int[] dilation, ConvolutionMode convolutionMode)
public Builder(int capsuleDimensions, int channels, int[] kernelSize, int[] stride, int[] padding, int[] dilation)
public Builder(int capsuleDimensions, int channels, int[] kernelSize, int[] stride, int[] padding)
public Builder(int capsuleDimensions, int channels, int[] kernelSize, int[] stride)
public Builder(int capsuleDimensions, int channels, int[] kernelSize)
public Builder(int capsuleDimensions, int channels)
public void setKernelSize(int... kernelSize)
public void setStride(int... stride)
public void setPadding(int... padding)
public void setDilation(int... dilation)
public PrimaryCapsules.Builder kernelSize(int... kernelSize)
kernelSize
- ConvolutionLayer.Builder.kernelSize(int...)
public PrimaryCapsules.Builder stride(int... stride)
stride
- ConvolutionLayer.Builder.stride(int...)
public PrimaryCapsules.Builder padding(int... padding)
padding
- ConvolutionLayer.Builder.padding(int...)
public PrimaryCapsules.Builder dilation(int... dilation)
dilation
- ConvolutionLayer.BaseConvBuilder.dilation(int...)
public PrimaryCapsules.Builder channels(int channels)
channels
- public PrimaryCapsules.Builder nOut(int nOut)
nOut
- public PrimaryCapsules.Builder capsuleDimensions(int capsuleDimensions)
capsuleDimensions
- public PrimaryCapsules.Builder capsules(int capsules)
capsules
- public PrimaryCapsules.Builder hasBias(boolean hasBias)
public PrimaryCapsules.Builder convolutionMode(ConvolutionMode convolutionMode)
convolutionMode
- public PrimaryCapsules.Builder useReLU(boolean useRelu)
useRelu
- public PrimaryCapsules.Builder useReLU()
public PrimaryCapsules.Builder useLeakyReLU(double leak)
leak
- the alpha value for the LeakyReLU activation.public <E extends Layer> E build()
build
in class Layer.Builder<PrimaryCapsules.Builder>
Copyright © 2020. All rights reserved.