kedarbellare commented on a change in pull request #13864: [Clojure] package 
infer tweaks
URL: https://github.com/apache/incubator-mxnet/pull/13864#discussion_r247324861
 
 

 ##########
 File path: contrib/clojure-package/src/org/apache/clojure_mxnet/infer.clj
 ##########
 @@ -87,19 +99,22 @@
     [wrapped-predictor inputs]
     (util/validate! ::wrapped-predictor wrapped-predictor
                     "Invalid predictor")
-    (util/validate! ::vec-of-float-arrays inputs
+    (util/validate! ::vvec-of-numbers inputs
                     "Invalid inputs")
-    (util/coerce-return-recursive
-     (.predict (:predictor wrapped-predictor)
-               (util/vec->indexed-seq inputs))))
+    (->> (.predict (:predictor wrapped-predictor)
+                   (util/vec->indexed-seq [(float-array (first inputs))]))
+        (util/coerce-return-recursive)
+        (first)
 
 Review comment:
   oh! i just remembered that this is changing semantics of `predict` API. 
instead of taking a vector of `[image1 image2 ...]` and returning 
`[predictions1 predictions2 ...]` this is just returning predictions for the 
first image. is that ok? a workaround may be to just take one `input` or 
`input-array` instead of a vector of those.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to