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/12/04 18:32:21 UTC

[GitHub] piyushghai commented on a change in pull request #13522: [MXNET-1249] Fix Object Detector Performance with GPU

piyushghai commented on a change in pull request #13522: [MXNET-1249] Fix Object Detector Performance with GPU
URL: https://github.com/apache/incubator-mxnet/pull/13522#discussion_r238784850
 
 

 ##########
 File path: scala-package/infer/src/main/scala/org/apache/mxnet/infer/ObjectDetector.scala
 ##########
 @@ -94,13 +94,13 @@ class ObjectDetector(modelPathPrefix: String,
   def objectDetectWithNDArray(input: IndexedSeq[NDArray], topK: Option[Int])
   : IndexedSeq[IndexedSeq[(String, Array[Float])]] = {
 
-    val predictResult = predictor.predictWithNDArray(input)(0)
+    val predictResult = predictor.predictWithNDArray(input)(0).asInContext(Context.cpu())
 
 Review comment:
   If possible, can we apply this to ```ImageClassifier``` class as well ? 
   Maybe this can provide a speed boost there as well ? 

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