OnFlyImageDataset

class OnFlyImageDataset : Dataset

This dataset keeps all data on disk and generates batches on-fly according preprocessing pipeline.

Parameters

xFiles

files to load images from

y

labels to use for the loaded images

preprocessing

preprocessing to apply to the loaded images

Types

Companion
Link copied to clipboard
object Companion

Functions

batchIterator
Link copied to clipboard
fun batchIterator(batchSize: Int): Dataset.BatchIterator

Returns BatchIterator with fixed batchSize.

getX
Link copied to clipboard
open override fun getX(idx: Int): FloatArray

Returns row by index idx.

getY
Link copied to clipboard
open override fun getY(idx: Int): Float

Returns label as FloatArray by index idx.

shuffle
Link copied to clipboard
open override fun shuffle(): OnFlyImageDataset

Shuffles the dataset.

split
Link copied to clipboard
open override fun split(splitRatio: Double): Pair<OnFlyImageDataset, OnFlyImageDataset>

Splits datasets on two sub-datasets according splitRatio.

xSize
Link copied to clipboard
open override fun xSize(): Int

Returns amount of data rows.