You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by GitBox <gi...@apache.org> on 2018/04/02 17:21:40 UTC

[GitHub] nswamy commented on a change in pull request #10343: [MXNET-116] Optimized functions with batch input

nswamy commented on a change in pull request #10343: [MXNET-116] Optimized functions with batch input
URL: https://github.com/apache/incubator-mxnet/pull/10343#discussion_r178594869
 
 

 ##########
 File path: scala-package/infer/src/main/scala/ml/dmlc/mxnet/infer/ImageClassifier.scala
 ##########
 @@ -195,19 +195,28 @@ object ImageClassifier {
 
   /**
     * Loading input batch of images
-    * @param inputImageDirPath
-    * @return List of buffered images
+    * @param inputImageFiles
+    * @return List of buffered images-
     */
-  def loadInputBatch(inputImageDirPath: String): List[BufferedImage] = {
+  def loadInputBatch(inputImageFiles: List[File]): List[BufferedImage] = {
+    inputImageFiles.map(file => ImageIO.read(file))
+  }
+
+  def generateBatches(inputImageDirPath: String, batchSize: Int = 100): List[List[File]] = {
 
 Review comment:
   don't feel like this belongs in ImageClassifier, please move to the example

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services