Template Function parpe::getBatches¶
Defined in File minibatchOptimization.h
Function Documentation¶
-
template<typename
T
>
std::vector<std::vector<T>>parpe
::
getBatches
(gsl::span<const T> data, int batchSize)¶ Split a vector into batches of the given size.
All but possibly the last one will be of Size batchSize.
- Return
Vector batches of data elements
- Parameters
data
: Data to be split into batchesbatchSize
: Number of elements in each batch