You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tika.apache.org by ta...@apache.org on 2019/05/08 15:08:44 UTC
[tika] branch master updated: TIKA-2868 - Fix DL4JVGG16Net,
broken w upgrade to dl4j-beta3
This is an automated email from the ASF dual-hosted git repository.
tallison pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/tika.git
The following commit(s) were added to refs/heads/master by this push:
new 1a1fa65 TIKA-2868 - Fix DL4JVGG16Net, broken w upgrade to dl4j-beta3
1a1fa65 is described below
commit 1a1fa651636b3af8919a7bf1ad87d5b8f23780b7
Author: TALLISON <ta...@apache.org>
AuthorDate: Wed May 8 11:07:05 2019 -0400
TIKA-2868 - Fix DL4JVGG16Net, broken w upgrade to dl4j-beta3
---
tika-dl/src/main/java/org/apache/tika/dl/imagerec/DL4JVGG16Net.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tika-dl/src/main/java/org/apache/tika/dl/imagerec/DL4JVGG16Net.java b/tika-dl/src/main/java/org/apache/tika/dl/imagerec/DL4JVGG16Net.java
index ac1fd70..07d9dbc 100644
--- a/tika-dl/src/main/java/org/apache/tika/dl/imagerec/DL4JVGG16Net.java
+++ b/tika-dl/src/main/java/org/apache/tika/dl/imagerec/DL4JVGG16Net.java
@@ -136,7 +136,7 @@ public class DL4JVGG16Net implements ObjectRecogniser {
for (int batch = 0; batch < predictions.size(0); batch++) {
INDArray currentBatch = predictions.getRow(batch).dup();
while (i < topN) {
- topNPredictions[i] = Nd4j.argMax(currentBatch, 1).getInt(0, 0);
+ topNPredictions[i] = Nd4j.argMax(currentBatch, 1).getInt(0);
topNProb[i] = currentBatch.getFloat(batch, topNPredictions[i]);
currentBatch.putScalar(0, topNPredictions[i], 0);
outLabels[i]= imageNetLabels.getLabel(topNPredictions[i]);