public class ConvolutionUtils
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
static int[] |
getHeightAndWidth(int[] shape)
Get the height and width
for an image
|
static int[] |
getHeightAndWidth(NeuralNetConfiguration conf)
Get the height and width
from the configuration
|
static int[] |
getOutputSize(org.nd4j.linalg.api.ndarray.INDArray inputData,
int[] kernel,
int[] strides,
int[] padding,
ConvolutionMode convolutionMode)
Get the output size (height/width) for the given inpud data and CNN configuration
|
static int[] |
getSameModeTopLeftPadding(int[] outSize,
int[] inSize,
int[] kernel,
int[] strides)
Get top and left padding for same mode only.
|
static int |
numChannels(int[] shape)
Returns the number of
feature maps for a given shape (must be at least 3 dimensions
|
static int |
numFeatureMap(NeuralNetConfiguration conf) |
static void |
validateCnnKernelStridePadding(int[] kernelSize,
int[] stride,
int[] padding)
Perform validation on the CNN layer kernel/stride/padding.
|
public static int[] getOutputSize(org.nd4j.linalg.api.ndarray.INDArray inputData,
int[] kernel,
int[] strides,
int[] padding,
ConvolutionMode convolutionMode)
inputData - Input datakernel - Kernel size (height/width)strides - Strides (height/width)padding - Padding (height/width)public static int[] getSameModeTopLeftPadding(int[] outSize,
int[] inSize,
int[] kernel,
int[] strides)
outSize - inSize - kernel - strides - public static int[] getHeightAndWidth(NeuralNetConfiguration conf)
conf - the configuration to get height and width frompublic static int numFeatureMap(NeuralNetConfiguration conf)
conf - the configuration to get
the number of kernels frompublic static int[] getHeightAndWidth(int[] shape)
shape - the shape of the imagepublic static int numChannels(int[] shape)
shape - the shape to get the
number of feature maps forpublic static void validateCnnKernelStridePadding(int[] kernelSize,
int[] stride,
int[] padding)
kernelSize - Kernel size array to checkstride - Stride array to checkpadding - Padding array to check