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 2018/08/16 15:32:20 UTC

[tika] 01/02: TIKA-2672 -- remove hard coded input dimensions

This is an automated email from the ASF dual-hosted git repository.

tallison pushed a commit to branch branch_1x
in repository https://gitbox.apache.org/repos/asf/tika.git

commit b542f9b4bd1527657a22a528f8d0340ef5cfb040
Author: Thejan Wijesinghe <th...@apache.org>
AuthorDate: Tue Aug 14 21:48:37 2018 +0530

    TIKA-2672 -- remove hard coded input dimensions
---
 .../src/main/java/org/apache/tika/dl/imagerec/DL4JInceptionV3Net.java   | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tika-dl/src/main/java/org/apache/tika/dl/imagerec/DL4JInceptionV3Net.java b/tika-dl/src/main/java/org/apache/tika/dl/imagerec/DL4JInceptionV3Net.java
index 5930765..abe65ff 100644
--- a/tika-dl/src/main/java/org/apache/tika/dl/imagerec/DL4JInceptionV3Net.java
+++ b/tika-dl/src/main/java/org/apache/tika/dl/imagerec/DL4JInceptionV3Net.java
@@ -260,7 +260,7 @@ public class DL4JInceptionV3Net implements ObjectRecogniser {
 
             KerasModelBuilder builder = new KerasModel().modelBuilder().modelHdf5Filename(modelWeightsPath)
                     .enforceTrainingConfig(false);
-            builder.inputShape(new int[]{299, 299, 3});
+            builder.inputShape(new int[]{imgHeight, imgWidth, 3});
             KerasModel model = builder.buildModel();
             this.graph = model.getComputationGraph();