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

 ##########
 File path: contrib/clojure-package/src/org/apache/clojure_mxnet/infer.clj
 ##########
 @@ -324,10 +358,12 @@
 
 (defn buffered-image-to-pixels
   "Convert input BufferedImage to NDArray of input shape"
-  [image input-shape-vec]
-  (util/validate! ::image image "Invalid image")
-  (util/validate! (s/coll-of int?) input-shape-vec "Invalid shape vector")
-  (ImageClassifier/bufferedImageToPixels image (shape/->shape input-shape-vec) 
dtype/FLOAT32))
+  ([image input-shape-vec]
+   (buffered-image-to-pixels image input-shape-vec dtype/FLOAT32))
+  ([image input-shape-vec dtype]
+   (util/validate! ::image image "Invalid image")
+   (util/validate! (s/coll-of int?) input-shape-vec "Invalid shape vector")
+   (ImageClassifier/bufferedImageToPixels image (shape/->shape 
input-shape-vec) dtype/FLOAT32)))
 
 Review comment:
   nice catch again - thanks :)

----------------------------------------------------------------
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