Package org.jetbrains.kotlinx.dl.api.core.util
Types
Functions
loadImageNetClassLabels
Link copied to clipboard
Forms mapping of class label to class name for the ImageNet dataset.
predictTopNLabels
Link copied to clipboard
fun predictTopNLabels(it: InferenceModel, floatArray: FloatArray, labels: MutableMap<Int, String>, topN: Int = 5): MutableMap<Int, Pair<String, Float>>
Content copied to clipboard
Returns top-N labels for the given floatArray encoded with mapping labels.
serializeLabelsToBuffer
Link copied to clipboard
fun serializeLabelsToBuffer(src: FloatArray, amountOfClasses: Long): FloatBuffer
Content copied to clipboard
Converts src to FloatBuffer.
serializeToBuffer
Link copied to clipboard
Converts src to FloatBuffer.
fun serializeToBuffer(src: Array<FloatArray>, start: Int, length: Int): FloatBuffer
Content copied to clipboard
Converts src to FloatBuffer from start position for the next length positions.