WuWei1986 / dl4j-ocr-demo

DL4J基于CNN+RNN+CTC实现的不定长文本识别demo
5 stars 1 forks source link

Exception in thread "main" java.lang.IllegalArgumentException: getRow() can be called on 2D arrays only #2

Open bewithme opened 3 years ago

bewithme commented 3 years ago

代码报错

for (int i = 0; i < (int)labelShape[0]; i ++) { int llength = 0; // label不对齐处理 for (int j = 0; j < (int)labelShape[2]; j ++) { //Exception in thread "main" java.lang.IllegalArgumentException: getRow() can be called on 2D arrays only 这里 reshapedLabels 有三个维度,不能用.getRow(i)和getColumn(j)方法 INDArray label = reshapedLabels.getRow(i).getColumn(j);