org.deeplearning4j.exception.DL4JInvalidInputException: Input that is not a matrix; expected matrix (rank 2), got rank 4 array with shape [128, 1, 28, 28]

Stack Overflow | Jerome tan | 1 week ago
  1. 0

    Do Anomaly detection on my own images use deeplearning4j

    Stack Overflow | 1 week ago | Jerome tan
    org.deeplearning4j.exception.DL4JInvalidInputException: Input that is not a matrix; expected matrix (rank 2), got rank 4 array with shape [128, 1, 28, 28]
  2. 0

    3 dimensional input for ConvNN (ND4J.vstack)

    GitHub | 1 month ago | nevermindeverybody
    org.deeplearning4j.exception.DL4JInvalidInputException: Got rank 3 array as input to ConvolutionLayer (layer name = (not named), layer index = 0) with shape [100, 23, 35]. Expected rank 4 array with shape [minibatchSize, layerInputDepth, inputHeight, inputWidth].
  3. 0

    Input problem with convolution neural network

    GitHub | 1 month ago | nevermindeverybody
    org.deeplearning4j.exception.DL4JInvalidInputException: Cannot do forward pass in Convolution layer (layer name = (not named), layer index = 0): input array depth does not match CNN layer configuration (data input depth = 35, [minibatch,inputDepth,height,width]=[100, 35, 23, 23]; expected input depth = 1)
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    MLPClassifier Feedforward Classification code failing at mode.fit

    GitHub | 10 months ago | vipinn123
    java.lang.IllegalStateException: Column of left array 2500 != rows of right 2 or rows of left array 74 != columns of right 10
  6. 0

    IllegalStateException during training a CNN model with DL4J

    GitHub | 2 months ago | okaradeli
    java.lang.IllegalStateException: Column of left array 336 != rows of right 384 or rows of left array 1 != columns of right 2

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. org.deeplearning4j.exception.DL4JInvalidInputException

      Input that is not a matrix; expected matrix (rank 2), got rank 4 array with shape [128, 1, 28, 28]

      at org.deeplearning4j.nn.layers.BaseLayer.preOutput()
    2. org.deeplearning4j.nn
      MultiLayerNetwork.computeGradientAndScore
      1. org.deeplearning4j.nn.layers.BaseLayer.preOutput(BaseLayer.java:363)
      2. org.deeplearning4j.nn.layers.BaseLayer.activate(BaseLayer.java:384)
      3. org.deeplearning4j.nn.layers.BaseLayer.activate(BaseLayer.java:405)
      4. org.deeplearning4j.nn.multilayer.MultiLayerNetwork.activationFromPrevLayer(MultiLayerNetwork.java:590)
      5. org.deeplearning4j.nn.multilayer.MultiLayerNetwork.feedForwardToLayer(MultiLayerNetwork.java:713)
      6. org.deeplearning4j.nn.multilayer.MultiLayerNetwork.computeGradientAndScore(MultiLayerNetwork.java:1821)
      6 frames
    3. org.deeplearning4j.optimize
      Solver.optimize
      1. org.deeplearning4j.optimize.solvers.BaseOptimizer.gradientAndScore(BaseOptimizer.java:151)
      2. org.deeplearning4j.optimize.solvers.StochasticGradientDescent.optimize(StochasticGradientDescent.java:54)
      3. org.deeplearning4j.optimize.Solver.optimize(Solver.java:51)
      3 frames
    4. org.deeplearning4j.nn
      MultiLayerNetwork.fit
      1. org.deeplearning4j.nn.multilayer.MultiLayerNetwork.fit(MultiLayerNetwork.java:1443)
      2. org.deeplearning4j.nn.multilayer.MultiLayerNetwork.fit(MultiLayerNetwork.java:1408)
      2 frames
    5. org.deeplearning4j.examples
      AnomalyTest.main
      1. org.deeplearning4j.examples.dataExamples.AnomalyTest.main(AnomalyTest.java:86)
      1 frame