paired_sampler {shapr} | R Documentation |
Sampling Paired Observations
Description
A sampler used to samples the batches where each instances is sampled twice
Usage
paired_sampler(vaeac_dataset_object, shuffle = FALSE)
Arguments
vaeac_dataset_object |
A |
shuffle |
Boolean. If |
Details
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.
Author(s)
Lars Henry Berge Olsen
[Package shapr version 1.0.4 Index]