
Mini-batch index plan with deterministic Fisher-Yates shuffling (hmdld)
Source:R/geron_w4a_native.R
morie_geron_dataloader.RdMini-batch index plan with deterministic Fisher-Yates shuffling (hmdld)
Usage
morie_geron_dataloader(
dataset,
batch_size,
shuffle = FALSE,
drop_last = FALSE,
seed = 0,
num_workers = 0
)Examples
morie_geron_dataloader(dataset = data.frame(x = c(1, 2, 3, 4), y = c(2, 4, 5, 9)), batch_size = 5L)
#> $batches
#> $batches[[1]]
#> [1] 0 1
#>
#>
#> $order
#> [1] 0 1
#>
#> $n_batches
#> [1] 1
#>
#> $last_batch_size
#> [1] 2
#>
#> $dropped
#> [1] 0
#>
#> $batch_size
#> [1] 5
#>
#> $shuffle
#> [1] FALSE
#>
#> $drop_last
#> [1] FALSE
#>
#> $worker_assignment
#> [1] 0
#>
#> $num_workers
#> [1] 0
#>
#> $batch_data
#> $batch_data[[1]]
#> x y
#> 1 1 2
#> 2 2 4
#> 3 3 5
#> 4 4 9
#>
#>
#> $estimate
#> [1] 1
#>
#> $n
#> [1] 2
#>
#> $method
#> [1] "mini-batch index plan with deterministic Fisher-Yates shuffling"
#>