Class InputTypeUtil
- java.lang.Object
-
- org.deeplearning4j.nn.conf.layers.InputTypeUtil
-
public class InputTypeUtil extends Object
-
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static void
convertMultipleTypes(InputType[] vertexInputs)
Convert multiple types when multiple are found.static InputType
getOutputTypeCnn1DLayers(InputType inputType, int kH, int sH, int padH, int dilation, ConvolutionMode convolutionMode, long outputDepth, long layerIdx, String layerName, Class<?> layerClass)
static InputType
getOutputTypeCnn3DLayers(InputType inputType, Convolution3D.DataFormat dataFormat, int[] kernelSize, int[] stride, int[] padding, int[] dilation, ConvolutionMode convolutionMode, long outputChannels, long layerIdx, String layerName, Class<?> layerClass)
static InputType
getOutputTypeCnnLayers(InputType inputType, int[] kernelSize, int[] stride, int[] padding, int[] dilation, ConvolutionMode convolutionMode, long outputDepth, long layerIdx, String layerName, Class<?> layerClass)
static InputType
getOutputTypeCnnLayers(InputType inputType, int[] kernelSize, int[] stride, int[] padding, int[] dilation, ConvolutionMode convolutionMode, long outputDepth, long layerIdx, String layerName, CNN2DFormat format, Class<?> layerClass)
static InputType
getOutputTypeDeconv3dLayer(InputType inputType, int[] kernelSize, int[] stride, int[] padding, int[] dilation, ConvolutionMode convolutionMode, Convolution3D.DataFormat dataFormat, long outputDepth, long layerIdx, String layerName, Class<?> layerClass)
static InputType
getOutputTypeDeconvLayer(InputType inputType, int[] kernelSize, int[] stride, int[] padding, int[] dilation, ConvolutionMode convolutionMode, long outputDepth, long layerIdx, String layerName, Class<?> layerClass)
static InputPreProcessor
getPreProcessorForInputTypeCnn3DLayers(InputType inputType, String layerName)
Utility method for determining the appropriate preprocessor for CNN layers, such asConvolutionLayer
andSubsamplingLayer
static InputPreProcessor
getPreProcessorForInputTypeCnnLayers(InputType inputType, String layerName)
Utility method for determining the appropriate preprocessor for CNN layers, such asConvolutionLayer
andSubsamplingLayer
static InputPreProcessor
getPreprocessorForInputTypeRnnLayers(InputType inputType, RNNFormat rnnDataFormat, String layerName)
-
-
-
Method Detail
-
getOutputTypeDeconvLayer
public static InputType getOutputTypeDeconvLayer(InputType inputType, int[] kernelSize, int[] stride, int[] padding, int[] dilation, ConvolutionMode convolutionMode, long outputDepth, long layerIdx, String layerName, Class<?> layerClass)
-
getOutputTypeDeconv3dLayer
public static InputType getOutputTypeDeconv3dLayer(InputType inputType, int[] kernelSize, int[] stride, int[] padding, int[] dilation, ConvolutionMode convolutionMode, Convolution3D.DataFormat dataFormat, long outputDepth, long layerIdx, String layerName, Class<?> layerClass)
-
getOutputTypeCnn3DLayers
public static InputType getOutputTypeCnn3DLayers(InputType inputType, Convolution3D.DataFormat dataFormat, int[] kernelSize, int[] stride, int[] padding, int[] dilation, ConvolutionMode convolutionMode, long outputChannels, long layerIdx, String layerName, Class<?> layerClass)
-
getOutputTypeCnn1DLayers
public static InputType getOutputTypeCnn1DLayers(InputType inputType, int kH, int sH, int padH, int dilation, ConvolutionMode convolutionMode, long outputDepth, long layerIdx, String layerName, Class<?> layerClass)
-
getOutputTypeCnnLayers
@Deprecated public static InputType getOutputTypeCnnLayers(InputType inputType, int[] kernelSize, int[] stride, int[] padding, int[] dilation, ConvolutionMode convolutionMode, long outputDepth, long layerIdx, String layerName, Class<?> layerClass)
-
getOutputTypeCnnLayers
public static InputType getOutputTypeCnnLayers(InputType inputType, int[] kernelSize, int[] stride, int[] padding, int[] dilation, ConvolutionMode convolutionMode, long outputDepth, long layerIdx, String layerName, CNN2DFormat format, Class<?> layerClass)
-
getPreProcessorForInputTypeCnn3DLayers
public static InputPreProcessor getPreProcessorForInputTypeCnn3DLayers(InputType inputType, String layerName)
Utility method for determining the appropriate preprocessor for CNN layers, such asConvolutionLayer
andSubsamplingLayer
- Parameters:
inputType
- Input type to get the preprocessor for- Returns:
- Null if no preprocessor is required; otherwise the appropriate preprocessor for the given input type
-
getPreProcessorForInputTypeCnnLayers
public static InputPreProcessor getPreProcessorForInputTypeCnnLayers(InputType inputType, String layerName)
Utility method for determining the appropriate preprocessor for CNN layers, such asConvolutionLayer
andSubsamplingLayer
- Parameters:
inputType
- Input type to get the preprocessor for- Returns:
- Null if no preprocessor is required; otherwise the appropriate preprocessor for the given input type
-
getPreprocessorForInputTypeRnnLayers
public static InputPreProcessor getPreprocessorForInputTypeRnnLayers(InputType inputType, RNNFormat rnnDataFormat, String layerName)
-
convertMultipleTypes
public static void convertMultipleTypes(InputType[] vertexInputs)
Convert multiple types when multiple are found. Only handles simple obvious cases, otherwise errs on throwing an exception. Useful for multiple input vertices such asMergeVertex
andElementWiseVertex
- Parameters:
vertexInputs
- the input types to convert
-
-