gigasquid commented on a change in pull request #13864: [Clojure] package infer
tweaks
URL: https://github.com/apache/incubator-mxnet/pull/13864#discussion_r247325037
##########
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:
good point. I'm thinking maybe that should be `map float array on the inputs
instead`
I'll add a test for it to be sure. Thanks for catching that :)
----------------------------------------------------------------
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