public static class LocallyConnected2D.Builder extends SameDiffLayer.Builder<LocallyConnected2D.Builder>
| Modifier and Type | Field and Description |
|---|---|
protected CNN2DFormat |
format |
paramWeightInit, weightInitbiasUpdater, regularization, regularizationBias, updaterallParamConstraints, biasConstraints, iDropout, layerName, weightConstraints| Constructor and Description |
|---|
Builder() |
| Modifier and Type | Method and Description |
|---|---|
LocallyConnected2D.Builder |
activation(Activation activation) |
LocallyConnected2D |
build() |
LocallyConnected2D.Builder |
convolutionMode(ConvolutionMode cm) |
LocallyConnected2D.Builder |
dataFormat(CNN2DFormat format)
Set the data format for the CNN activations - NCHW (channels first) or NHWC (channels last).
|
LocallyConnected2D.Builder |
dilation(int... d) |
LocallyConnected2D.Builder |
hasBias(boolean hasBias) |
LocallyConnected2D.Builder |
kernelSize(int... k) |
LocallyConnected2D.Builder |
nIn(int nIn) |
LocallyConnected2D.Builder |
nOut(int nOut) |
LocallyConnected2D.Builder |
padding(int... p) |
void |
setDilation(int... dilation) |
LocallyConnected2D.Builder |
setInputSize(int... inputSize)
Set input filter size (h,w) for this locally connected 2D layer
|
void |
setKernel(int... kernel) |
void |
setPadding(int... padding) |
void |
setStride(int... stride) |
LocallyConnected2D.Builder |
stride(int... s) |
weightInit, weightInitbiasUpdater, l1, l1Bias, l2, l2Bias, regularization, regularizationBias, updater, weightDecay, weightDecay, weightDecayBias, weightDecayBiasconstrainAllParameters, constrainBias, constrainWeights, dropOut, dropOut, nameprotected CNN2DFormat format
public void setKernel(int... kernel)
kernel - Kernel size for the layer. Must be 2 values (height/width)public void setStride(int... stride)
stride - Stride for the layer. Must be 2 values (height/width)public void setPadding(int... padding)
padding - Padding for the layer. Not used if ConvolutionMode.Same is set. Must be 2 values (height/width)public void setDilation(int... dilation)
dilation - Dilation for the layer. Must be 2 values (height/width)public LocallyConnected2D.Builder nIn(int nIn)
nIn - Number of inputs to the layer (input size)public LocallyConnected2D.Builder nOut(int nOut)
nOut - Number of outputs (output size)public LocallyConnected2D.Builder activation(Activation activation)
activation - Activation function for the layerpublic LocallyConnected2D.Builder kernelSize(int... k)
k - Kernel size for the layer. Must be 2 values (height/width)public LocallyConnected2D.Builder stride(int... s)
s - Stride for the layer. Must be 2 values (height/width)public LocallyConnected2D.Builder padding(int... p)
p - Padding for the layer. Not used if ConvolutionMode.Same is set. Must be 2 values (height/width)public LocallyConnected2D.Builder convolutionMode(ConvolutionMode cm)
cm - Convolution mode for the layer. See ConvolutionMode for detailspublic LocallyConnected2D.Builder dilation(int... d)
d - Dilation for the layer. Must be 2 values (height/width)public LocallyConnected2D.Builder dataFormat(CNN2DFormat format)
CNN2DFormat for more details.format - Format for activations (in and out)public LocallyConnected2D.Builder hasBias(boolean hasBias)
hasBias - If true (default is false) the layer will have a biaspublic LocallyConnected2D.Builder setInputSize(int... inputSize)
inputSize - pair of height and width of the input filters to this layerpublic LocallyConnected2D build()
build in class Layer.Builder<LocallyConnected2D.Builder>Copyright © 2021. All rights reserved.