public static class ConvolutionLayer.Builder extends ConvolutionLayer.BaseConvBuilder<ConvolutionLayer.Builder>
convolutionMode, cudnnAlgoMode, kernelSize, padding, stride
nIn, nOut
activationFn, adamMeanDecay, adamVarDecay, biasInit, biasLearningRate, dist, dropOut, epsilon, gradientNormalization, gradientNormalizationThreshold, l1, l1Bias, l2, l2Bias, layerName, learningRate, learningRatePolicy, learningRateSchedule, momentum, momentumAfter, rho, rmsDecay, updater, weightInit
Constructor and Description |
---|
Builder() |
Builder(int... kernelSize) |
Builder(int[] kernelSize,
int[] stride) |
Builder(int[] kernelSize,
int[] stride,
int[] padding) |
Modifier and Type | Method and Description |
---|---|
ConvolutionLayer.Builder |
activation(org.nd4j.linalg.activations.Activation activation) |
ConvolutionLayer.Builder |
activation(org.nd4j.linalg.activations.IActivation activationFunction) |
ConvolutionLayer.Builder |
adamMeanDecay(double adamMeanDecay)
Mean decay rate for Adam updater.
|
ConvolutionLayer.Builder |
adamVarDecay(double adamVarDecay)
Variance decay rate for Adam updater.
|
ConvolutionLayer.Builder |
biasInit(double biasInit) |
ConvolutionLayer.Builder |
biasLearningRate(double biasLearningRate)
Bias learning rate.
|
ConvolutionLayer |
build() |
ConvolutionLayer.Builder |
convolutionMode(ConvolutionMode convolutionMode)
Set the convolution mode for the Convolution layer.
|
ConvolutionLayer.Builder |
cudnnAlgoMode(ConvolutionLayer.AlgoMode cudnnAlgoMode)
Defaults to "PREFER_FASTEST", but "NO_WORKSPACE" uses less memory.
|
ConvolutionLayer.Builder |
dist(Distribution dist)
Distribution to sample initial weights from.
|
ConvolutionLayer.Builder |
dropOut(double dropOut)
Dropout.
|
ConvolutionLayer.Builder |
epsilon(double epsilon)
Epsilon value for updaters: Adagrad and Adadelta.
|
ConvolutionLayer.Builder |
gradientNormalization(GradientNormalization gradientNormalization)
Gradient normalization strategy.
|
ConvolutionLayer.Builder |
gradientNormalizationThreshold(double threshold)
Threshold for gradient normalization, only used for GradientNormalization.ClipL2PerLayer,
GradientNormalization.ClipL2PerParamType, and GradientNormalization.ClipElementWiseAbsoluteValue
Not used otherwise. L2 threshold for first two types of clipping, or absolute value threshold for last type of clipping. |
ConvolutionLayer.Builder |
kernelSize(int... kernelSize)
Size of the convolution
rows/columns
|
ConvolutionLayer.Builder |
l1(double l1)
L1 regularization coefficient (weights only).
|
ConvolutionLayer.Builder |
l1Bias(double l1Bias)
L1 regularization coefficient for the bias.
|
ConvolutionLayer.Builder |
l2(double l2)
L2 regularization coefficient (weights only).
|
ConvolutionLayer.Builder |
l2Bias(double l2Bias)
L2 regularization coefficient for the bias.
|
ConvolutionLayer.Builder |
learningRate(double learningRate)
Learning rate.
|
ConvolutionLayer.Builder |
learningRateDecayPolicy(LearningRatePolicy policy)
Learning rate decay policy.
|
ConvolutionLayer.Builder |
learningRateSchedule(java.util.Map<java.lang.Integer,java.lang.Double> learningRateSchedule)
Learning rate schedule.
|
ConvolutionLayer.Builder |
momentum(double momentum)
Momentum rate.
|
ConvolutionLayer.Builder |
momentumAfter(java.util.Map<java.lang.Integer,java.lang.Double> momentumAfter)
Momentum schedule.
|
ConvolutionLayer.Builder |
name(java.lang.String layerName)
Layer name assigns layer string name.
|
ConvolutionLayer.Builder |
nIn(int nIn) |
ConvolutionLayer.Builder |
nOut(int nOut) |
ConvolutionLayer.Builder |
padding(int... padding) |
ConvolutionLayer.Builder |
rho(double rho)
Ada delta coefficient, rho.
|
ConvolutionLayer.Builder |
rmsDecay(double rmsDecay)
Decay rate for RMSProp.
|
ConvolutionLayer.Builder |
stride(int... stride) |
ConvolutionLayer.Builder |
updater(Updater updater)
Gradient updater.
|
ConvolutionLayer.Builder |
weightInit(WeightInit weightInit)
Weight initialization scheme.
|
activation
public Builder(int[] kernelSize, int[] stride, int[] padding)
public Builder(int[] kernelSize, int[] stride)
public Builder(int... kernelSize)
public Builder()
public ConvolutionLayer.Builder convolutionMode(ConvolutionMode convolutionMode)
ConvolutionMode
for more detailsconvolutionMode
in class ConvolutionLayer.BaseConvBuilder<ConvolutionLayer.Builder>
convolutionMode
- Convolution mode for layerpublic ConvolutionLayer.Builder nIn(int nIn)
nIn
in class FeedForwardLayer.Builder<ConvolutionLayer.Builder>
public ConvolutionLayer.Builder nOut(int nOut)
nOut
in class FeedForwardLayer.Builder<ConvolutionLayer.Builder>
public ConvolutionLayer.Builder cudnnAlgoMode(ConvolutionLayer.AlgoMode cudnnAlgoMode)
cudnnAlgoMode
in class ConvolutionLayer.BaseConvBuilder<ConvolutionLayer.Builder>
cudnnAlgoMode
- public ConvolutionLayer.Builder name(java.lang.String layerName)
name
in class Layer.Builder<ConvolutionLayer.Builder>
layerName
- public ConvolutionLayer.Builder activation(org.nd4j.linalg.activations.IActivation activationFunction)
activation
in class Layer.Builder<ConvolutionLayer.Builder>
public ConvolutionLayer.Builder activation(org.nd4j.linalg.activations.Activation activation)
activation
in class Layer.Builder<ConvolutionLayer.Builder>
public ConvolutionLayer.Builder weightInit(WeightInit weightInit)
weightInit
in class Layer.Builder<ConvolutionLayer.Builder>
weightInit
- WeightInit
public ConvolutionLayer.Builder biasInit(double biasInit)
biasInit
in class Layer.Builder<ConvolutionLayer.Builder>
public ConvolutionLayer.Builder dist(Distribution dist)
dist
in class Layer.Builder<ConvolutionLayer.Builder>
dist
- public ConvolutionLayer.Builder learningRate(double learningRate)
learningRate
in class Layer.Builder<ConvolutionLayer.Builder>
learningRate
- public ConvolutionLayer.Builder biasLearningRate(double biasLearningRate)
biasLearningRate
in class Layer.Builder<ConvolutionLayer.Builder>
biasLearningRate
- public ConvolutionLayer.Builder learningRateSchedule(java.util.Map<java.lang.Integer,java.lang.Double> learningRateSchedule)
learningRateSchedule
in class Layer.Builder<ConvolutionLayer.Builder>
learningRateSchedule
- public ConvolutionLayer.Builder l1(double l1)
l1Bias(double)
to configure the l1 regularization
coefficient for the bias.l1
in class Layer.Builder<ConvolutionLayer.Builder>
l1
- public ConvolutionLayer.Builder l2(double l2)
l2Bias(double)
to configure the l2 regularization
coefficient for the bias.l2
in class Layer.Builder<ConvolutionLayer.Builder>
l2
- public ConvolutionLayer.Builder l1Bias(double l1Bias)
l1(double)
l1Bias
in class Layer.Builder<ConvolutionLayer.Builder>
l1Bias
- public ConvolutionLayer.Builder l2Bias(double l2Bias)
l2(double)
l2Bias
in class Layer.Builder<ConvolutionLayer.Builder>
l2Bias
- public ConvolutionLayer.Builder dropOut(double dropOut)
dropOut
in class Layer.Builder<ConvolutionLayer.Builder>
dropOut
- public ConvolutionLayer.Builder momentum(double momentum)
momentum
in class Layer.Builder<ConvolutionLayer.Builder>
momentum
- public ConvolutionLayer.Builder momentumAfter(java.util.Map<java.lang.Integer,java.lang.Double> momentumAfter)
momentumAfter
in class Layer.Builder<ConvolutionLayer.Builder>
momentumAfter
- public ConvolutionLayer.Builder updater(Updater updater)
updater
in class Layer.Builder<ConvolutionLayer.Builder>
updater
- Updater
public ConvolutionLayer.Builder rho(double rho)
rho
in class Layer.Builder<ConvolutionLayer.Builder>
rho
- public ConvolutionLayer.Builder rmsDecay(double rmsDecay)
rmsDecay
in class Layer.Builder<ConvolutionLayer.Builder>
rmsDecay
- public ConvolutionLayer.Builder epsilon(double epsilon)
epsilon
in class Layer.Builder<ConvolutionLayer.Builder>
epsilon
- Epsilon value to use for adagrad and adadeltapublic ConvolutionLayer.Builder adamMeanDecay(double adamMeanDecay)
adamMeanDecay
in class Layer.Builder<ConvolutionLayer.Builder>
adamMeanDecay
- public ConvolutionLayer.Builder adamVarDecay(double adamVarDecay)
adamVarDecay
in class Layer.Builder<ConvolutionLayer.Builder>
adamVarDecay
- public ConvolutionLayer.Builder gradientNormalization(GradientNormalization gradientNormalization)
gradientNormalization
in class Layer.Builder<ConvolutionLayer.Builder>
gradientNormalization
- Type of normalization to use. Defaults to None.GradientNormalization
public ConvolutionLayer.Builder gradientNormalizationThreshold(double threshold)
gradientNormalizationThreshold
in class Layer.Builder<ConvolutionLayer.Builder>
threshold
- public ConvolutionLayer.Builder learningRateDecayPolicy(LearningRatePolicy policy)
learningRateDecayPolicy
in class Layer.Builder<ConvolutionLayer.Builder>
policy
- Type of policy to use. Defaults to None.GradientNormalization
public ConvolutionLayer.Builder kernelSize(int... kernelSize)
kernelSize
- the height and width of the
kernelpublic ConvolutionLayer.Builder stride(int... stride)
public ConvolutionLayer.Builder padding(int... padding)
public ConvolutionLayer build()
build
in class Layer.Builder<ConvolutionLayer.Builder>