clj-djl.training.dataset

array-dataset

(array-dataset {:keys [data labels sampler batchsize shuffle droplast]})

array-dataset-builder

(array-dataset-builder)

batch-sampler

(batch-sampler subsampler batchsize)(batch-sampler subsampler batchsize droplast)

Creates a new instance of BatchSampler that samples from the given SubSampler, and yields a mini-batch of batchsize, with optional droplast(true, false) to drop the remaining samples.

build

(build builder)

close

(close batch)

get-data

(get-data batch)

get-data-iterator

(get-data-iterator ds manager)

get-labels

(get-labels batch)

iter-seq

(iter-seq iterable)(iter-seq iterable iter)

new-array-dataset-builder

opt-labels

(opt-labels builder & labels)

opt-usage

multimethod

prepare

(prepare ds)(prepare ds progress)

random-sampler

(random-sampler)(random-sampler seed)

Creates a new instance of RandomSampler with an optional seed

random-split

(random-split dataset & ratios)

sequence-sampler

(sequence-sampler)

SequenceSampler samples the data from [0, dataset.size) sequentially.

set-data

(set-data builder & data)

set-sampling

(set-sampling builder sampler)(set-sampling builder batch-size random)(set-sampling builder batch-size random drop-last)

to-apair

(to-apair dataset)

Convert dataset to a pair of two arrays. First item is the data, and the second item is the labels