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

[MXNET-1257] fix the Float not showing correctly problem #13617

Merged
merged 1 commit into from
Dec 11, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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