Companion

object Companion

Functions

create
Link copied to clipboard
fun create(pathToData: File, labels: FloatArray, preprocessing: Preprocessing = Preprocessing()): OnFlyImageDataset

Create dataset OnFlyImageDataset from pathToData and labels using preprocessing to prepare images.

fun create(pathToData: File, labelGenerator: LabelGenerator, preprocessors: Preprocessing = Preprocessing()): OnFlyImageDataset

Create dataset OnFlyImageDataset from pathToData and labelGenerator using preprocessing to prepare images.

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.