Class Cropping2D.Builder
- java.lang.Object
-
- org.deeplearning4j.nn.conf.layers.Layer.Builder<Cropping2D.Builder>
-
- org.deeplearning4j.nn.conf.layers.convolutional.Cropping2D.Builder
-
- Enclosing class:
- Cropping2D
public static class Cropping2D.Builder extends Layer.Builder<Cropping2D.Builder>
-
-
Field Summary
-
Fields inherited from class org.deeplearning4j.nn.conf.layers.Layer.Builder
allParamConstraints, biasConstraints, iDropout, layerName, weightConstraints
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Cropping2D
build()
Cropping2D.Builder
dataFormat(CNN2DFormat format)
Set the data format for the CNN activations - NCHW (channels first) or NHWC (channels last).void
setCropping(int... cropping)
-
Methods inherited from class org.deeplearning4j.nn.conf.layers.Layer.Builder
constrainAllParameters, constrainBias, constrainWeights, dropOut, dropOut, name
-
-
-
-
Constructor Detail
-
Builder
public Builder()
-
Builder
public Builder(@NonNull @lombok.NonNull int[] cropping)
- Parameters:
cropping
- Cropping amount for top/bottom/left/right (in that order). Must be length 4 array.
-
Builder
public Builder(int cropTopBottom, int cropLeftRight)
- Parameters:
cropTopBottom
- Amount of cropping to apply to both the top and the bottom of the input activationscropLeftRight
- Amount of cropping to apply to both the left and the right of the input activations
-
Builder
public Builder(int cropTop, int cropBottom, int cropLeft, int cropRight)
- Parameters:
cropTop
- Amount of cropping to apply to the top of the input activationscropBottom
- Amount of cropping to apply to the bottom of the input activationscropLeft
- Amount of cropping to apply to the left of the input activationscropRight
- Amount of cropping to apply to the right of the input activations
-
-
Method Detail
-
dataFormat
public Cropping2D.Builder dataFormat(CNN2DFormat format)
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)
-
setCropping
public void setCropping(int... cropping)
- Parameters:
cropping
- Cropping amount for top/bottom/left/right (in that order). Must be length 1, 2, or 4 array.
-
build
public Cropping2D build()
- Specified by:
build
in classLayer.Builder<Cropping2D.Builder>
-
-