clj-djl.training.dataset
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.
random-sampler
(random-sampler)(random-sampler seed)Creates a new instance of RandomSampler with an optional seed
sequence-sampler
(sequence-sampler)SequenceSampler samples the data from [0, dataset.size) sequentially.
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