A sampler used to samples the batches where each instances is sampled twice
paired_sampler(vaeac_dataset_object, shuffle = FALSE)A vaeac_dataset() object containing the data.
Boolean. If TRUE, then the data is shuffled. If FALSE,
then the data is returned in chronological order.
Lars Henry Berge Olsen
A sampler object that allows for paired sampling by always including each observation from the
vaeac_dataset() twice. A torch::sampler() object can be used with torch::dataloader() when creating
batches from a torch dataset torch::dataset(). See https://rdrr.io/cran/torch/src/R/utils-data-sampler.R for
more information. This function does not use batch iterators, which might increase the speed.