Class InputType

    • Constructor Detail

      • InputType

        public InputType()
    • Method Detail

      • getDefaultCNN2DFormat

        public static CNN2DFormat getDefaultCNN2DFormat()
      • setDefaultCNN2DFormat

        public static void setDefaultCNN2DFormat​(CNN2DFormat defaultCNN2DFormat)
      • arrayElementsPerExample

        public abstract long arrayElementsPerExample()
      • getShape

        public abstract long[] getShape​(boolean includeBatchDim)
        Returns the shape of this InputType
        Parameters:
        includeBatchDim - Whether to include minibatch in the return shape array
        Returns:
        int[]
      • getShape

        public long[] getShape()
        Returns the shape of this InputType without minibatch dimension in the returned array
        Returns:
        int[]
      • feedForward

        public static InputType feedForward​(long size)
        InputType for feed forward network data
        Parameters:
        size - The size of the activations
        Returns:
        InputTypeFeedForward
      • feedForward

        public static InputType feedForward​(long size,
                                            DataFormat timeDistributedFormat)
      • recurrent

        public static InputType recurrent​(long size)
        InputType for recurrent neural network (time series) data
        Parameters:
        size - The size of the activations
        Returns:
        InputTypeRecurrent
      • recurrent

        public static InputType recurrent​(long size,
                                          long timeSeriesLength)
        InputType for recurrent neural network (time series) data
        Parameters:
        size - The size of the activations
        timeSeriesLength - Length of the input time series
        Returns:
        InputTypeRecurrent
      • recurrent

        public static InputType recurrent​(long size,
                                          long timeSeriesLength,
                                          RNNFormat format)
      • convolutional

        public static InputType convolutional​(long height,
                                              long width,
                                              long depth)
        Input type for convolutional (CNN) data, that is 4d with shape [miniBatchSize, channels, height, width]. For CNN data that has been flattened, use convolutionalFlat(long, long, long)
        Parameters:
        height - height of the input
        width - Width of the input
        depth - Depth, or number of channels
        Returns:
        InputTypeConvolutional
      • convolutional

        public static InputType convolutional​(long height,
                                              long width,
                                              long depth,
                                              CNN2DFormat format)
      • convolutional3D

        @Deprecated
        public static InputType convolutional3D​(long depth,
                                                long height,
                                                long width,
                                                long channels)
        Input type for 3D convolutional (CNN3D) data in NDHWC format, that is 5d with shape [miniBatchSize, depth, height, width, channels].
        Parameters:
        height - height of the input
        width - Width of the input
        depth - Depth of the input
        channels - Number of channels of the input
        Returns:
        InputTypeConvolutional3D
      • convolutional3D

        public static InputType convolutional3D​(Convolution3D.DataFormat dataFormat,
                                                long depth,
                                                long height,
                                                long width,
                                                long channels)
        Input type for 3D convolutional (CNN3D) 5d data:
        If NDHWC format [miniBatchSize, depth, height, width, channels]
        If NDCWH
        Parameters:
        height - height of the input
        width - Width of the input
        depth - Depth of the input
        channels - Number of channels of the input
        Returns:
        InputTypeConvolutional3D
      • convolutionalFlat

        public static InputType convolutionalFlat​(long height,
                                                  long width,
                                                  long depth)
        Input type for convolutional (CNN) data, where the data is in flattened (row vector) format. Expect data with shape [miniBatchSize, height * width * channels]. For CNN data in 4d format, use convolutional(long, long, long)
        Parameters:
        height - Height of the (unflattened) data represented by this input type
        width - Width of the (unflattened) data represented by this input type
        depth - Depth of the (unflattened) data represented by this input type
        Returns:
        InputTypeConvolutionalFlat
      • inferInputTypes

        public static InputType[] inferInputTypes​(INDArray... inputArrays)