Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

Commit

Permalink
fix the Float not showing correctly problem (#13617)
Browse files Browse the repository at this point in the history
Merge this PR for 1.4.x
  • Loading branch information
lanking520 authored Dec 11, 2018
1 parent 449e17d commit 1f8bb26
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -80,10 +80,11 @@ class Predictor private[mxnet] (val predictor: org.apache.mxnet.infer.Predictor)
An extra List is needed for when the model has more than one input.
* @return Indexed sequence array of outputs
*/
def predict(input: java.util.List[java.util.List[Float]]):
java.util.List[java.util.List[Float]] = {
def predict(input: java.util.List[java.util.List[java.lang.Float]]):
java.util.List[java.util.List[java.lang.Float]] = {
val in = JavaConverters.asScalaIteratorConverter(input.iterator).asScala.toIndexedSeq
(predictor.predict(in map {a => a.asScala.toArray}) map {b => b.toList.asJava}).asJava
(predictor.predict(in map {a => a.asScala.map(Float2float).toArray})
map {b => b.map(float2Float).toList.asJava}).asJava
}


Expand Down

0 comments on commit 1f8bb26

Please sign in to comment.