java.lang.IllegalStateException: Mis matched lengths: [28] != [100352]

GitHub | jerome-tan-git | 3 months ago
tip
Click on the to mark the solution that helps you, Samebug will learn from it.
As a community member, you’ll be rewarded for you help.
  1. Speed up your debug routine!

    Automated exception search integrated into your IDE

  2. 0

    IllegalStateException during training a CNN model with DL4J

    GitHub | 5 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. java.lang.IllegalStateException

      Mis matched lengths: [28] != [100352]

      at org.nd4j.linalg.util.LinAlgExceptions.assertSameLength()
    2. nd4j-api
      LinAlgExceptions.assertSameLength
      1. org.nd4j.linalg.util.LinAlgExceptions.assertSameLength(LinAlgExceptions.java:40)
      1 frame
    3. org.nd4j.linalg
      Set.<init>
      1. org.nd4j.linalg.api.ops.BaseTransformOp.<init>(BaseTransformOp.java:48)
      2. org.nd4j.linalg.api.ops.impl.transforms.Set.<init>(Set.java:25)
      2 frames
    4. nd4j-api
      BaseNDArray.reshape
      1. org.nd4j.linalg.api.ndarray.BaseNDArray.assign(BaseNDArray.java:1137)
      2. org.nd4j.linalg.api.ndarray.BaseNDArray.reshape(BaseNDArray.java:3597)
      3. org.nd4j.linalg.api.ndarray.BaseNDArray.reshape(BaseNDArray.java:3640)
      4. org.nd4j.linalg.api.ndarray.BaseNDArray.reshape(BaseNDArray.java:3873)
      4 frames
    5. org.deeplearning4j.nn
      MultiLayerNetwork.computeGradientAndScore
      1. org.deeplearning4j.nn.layers.BaseOutputLayer.getLabels2d(BaseOutputLayer.java:412)
      2. org.deeplearning4j.nn.layers.BaseOutputLayer.getGradientsAndDelta(BaseOutputLayer.java:170)
      3. org.deeplearning4j.nn.layers.BaseOutputLayer.backpropGradient(BaseOutputLayer.java:151)
      4. org.deeplearning4j.nn.multilayer.MultiLayerNetwork.calcBackpropGradients(MultiLayerNetwork.java:1097)
      5. org.deeplearning4j.nn.multilayer.MultiLayerNetwork.backprop(MultiLayerNetwork.java:1049)
      6. org.deeplearning4j.nn.multilayer.MultiLayerNetwork.computeGradientAndScore(MultiLayerNetwork.java:1833)
      6 frames
    6. 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
    7. 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
    8. org.deeplearning4j.examples
      AnomalyTest.main
      1. org.deeplearning4j.examples.dataExamples.AnomalyTest.main(AnomalyTest.java:75)
      1 frame