Companion

object Companion

Functions

create
Link copied to clipboard
fun create(preprocessors: Preprocessing): OnFlyImageDataset

Use preprocessors to prepare data to create dataset OnFlyImageDataset.

fun create(preprocessors: Preprocessing, labels: FloatArray): OnFlyImageDataset

Use preprocessors and labels to prepare data to create dataset OnFlyImageDataset.

toNormalizedVector
Link copied to clipboard
fun toNormalizedVector(bytes: ByteArray): FloatArray

Normalizes bytes via division on 255 to get values in range '[0; 1)'.

toOneHotVector
Link copied to clipboard
fun toOneHotVector(numClasses: Int, label: Byte): FloatArray

Creates binary vector with size numClasses from label.

toRawVector
Link copied to clipboard
fun toRawVector(bytes: ByteArray): FloatArray

Converts bytes to FloatArray.