BatchIterators.BatchIterator
— TypeBatchIterator(X; batchsize = nothing, limit=size(X,2))
Wrapper allowing to iterate over batches of batchsize
columns of X
. X
can be of any type supporting size
and 2d indexing. When limit
is provided, iteration is restricted to the columns of X[:, 1:limit]
.
BatchIterators.centered_batch_iterator
— Methodcentered_batch_iterator(X; kwargs...)
Similar to BatchIterator, but performs first one pass over the data to compute the mean, and centers the batches.
BatchIterators.choose_batchsize
— Methodchoose_batchsize(d, n; maxmemGB = 1.0, maxbatchsize = 2^14, sizeoneB = d*sizeof(Float64))
Computes the size (nb. of columns) of a batch, so that each column of the batch can be converted to a vector of size sizeoneB
(in bytes) with a total memory constrained by maxmemGB
(gigabytes).