Class LocalResponseNormalization.Builder
- java.lang.Object
-
- org.deeplearning4j.nn.conf.layers.Layer.Builder<LocalResponseNormalization.Builder>
-
- org.deeplearning4j.nn.conf.layers.LocalResponseNormalization.Builder
-
- Enclosing class:
- LocalResponseNormalization
public static class LocalResponseNormalization.Builder extends Layer.Builder<LocalResponseNormalization.Builder>
-
-
Field Summary
Fields Modifier and Type Field Description protected boolean
cudnnAllowFallback
When using CuDNN and an error is encountered, should fallback to the non-CuDNN implementatation be allowed? If set to false, an exception in CuDNN will be propagated back to the user.protected CNN2DFormat
dataFormat
-
Fields inherited from class org.deeplearning4j.nn.conf.layers.Layer.Builder
allParamConstraints, biasConstraints, iDropout, layerName, weightConstraints
-
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description LocalResponseNormalization.Builder
alpha(double alpha)
LRN scaling constant alpha.LocalResponseNormalization.Builder
beta(double beta)
Scaling constant beta.LocalResponseNormalization
build()
LocalResponseNormalization.Builder
cudnnAllowFallback(boolean allowFallback)
Deprecated.LocalResponseNormalization.Builder
dataFormat(CNN2DFormat dataFormat)
Set the data format for the CNN activations - NCHW (channels first) or NHWC (channels last).LocalResponseNormalization.Builder
helperAllowFallback(boolean allowFallback)
When using CuDNN or MKLDNN and an error is encountered, should fallback to the non-helper implementation be allowed? If set to false, an exception in the helper will be propagated back to the user.LocalResponseNormalization.Builder
k(double k)
LRN scaling constant k.LocalResponseNormalization.Builder
n(double n)
Number of adjacent kernel maps to use when doing LRN.-
Methods inherited from class org.deeplearning4j.nn.conf.layers.Layer.Builder
constrainAllParameters, constrainBias, constrainWeights, dropOut, dropOut, name
-
-
-
-
Field Detail
-
cudnnAllowFallback
protected boolean cudnnAllowFallback
When using CuDNN and an error is encountered, should fallback to the non-CuDNN implementatation be allowed? If set to false, an exception in CuDNN will be propagated back to the user. If false, the built-in (non-CuDNN) implementation for BatchNormalization will be used
-
dataFormat
protected CNN2DFormat dataFormat
-
-
Method Detail
-
k
public LocalResponseNormalization.Builder k(double k)
LRN scaling constant k. Default: 2- Parameters:
k
- Scaling constant
-
n
public LocalResponseNormalization.Builder n(double n)
Number of adjacent kernel maps to use when doing LRN. default: 5- Parameters:
n
- Number of adjacent kernel maps
-
alpha
public LocalResponseNormalization.Builder alpha(double alpha)
LRN scaling constant alpha. Default: 1e-4- Parameters:
alpha
- Scaling constant
-
beta
public LocalResponseNormalization.Builder beta(double beta)
Scaling constant beta. Default: 0.75- Parameters:
beta
- Scaling constant
-
cudnnAllowFallback
@Deprecated public LocalResponseNormalization.Builder cudnnAllowFallback(boolean allowFallback)
Deprecated.When using CuDNN and an error is encountered, should fallback to the non-CuDNN implementatation be allowed? If set to false, an exception in CuDNN will be propagated back to the user. If true, the built-in (non-CuDNN) implementation for BatchNormalization will be used- Parameters:
allowFallback
- Whether fallback to non-CuDNN implementation should be used
-
helperAllowFallback
public LocalResponseNormalization.Builder helperAllowFallback(boolean allowFallback)
When using CuDNN or MKLDNN and an error is encountered, should fallback to the non-helper implementation be allowed? If set to false, an exception in the helper will be propagated back to the user. If true, the built-in (non-MKL/CuDNN) implementation for LocalResponseNormalizationLayer will be used- Parameters:
allowFallback
- Whether fallback to non-CuDNN implementation should be used
-
dataFormat
public LocalResponseNormalization.Builder dataFormat(CNN2DFormat dataFormat)
Set the data format for the CNN activations - NCHW (channels first) or NHWC (channels last). SeeCNN2DFormat
for more details.
Default: NCHW- Parameters:
format
- Format for activations (in and out)
-
build
public LocalResponseNormalization build()
- Specified by:
build
in classLayer.Builder<LocalResponseNormalization.Builder>
-
-