andrewfayres commented on a change in pull request #12848: Fix Batch input
issue with Scala Benchmark
URL: https://github.com/apache/incubator-mxnet/pull/12848#discussion_r226751691
##########
File path:
scala-package/infer/src/main/scala/org/apache/mxnet/infer/ImageClassifier.scala
##########
@@ -182,7 +180,7 @@ object ImageClassifier {
resizedImage.flush()
// creating NDArray according to the input shape
- val pixelsArray = NDArray.array(result, shape = inputImageShape)
+ val pixelsArray = NDArray.array(result, shape = new Shape(1 +:
inputImageShape.toVector))
Review comment:
I think it should be done outside. Currently it does exactly what the
javadocs say it does. Takes a buffered image and turns it into an NDArray of
shape inputShape. As it turns out this isn't actually what we wanted to be
doing.
Also, this is a public api. As long as we have a reasonable alternative we
should try to avoid changing it's behavior.
----------------------------------------------------------------
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