batches(ofSize:dropsLastPartialBatch:)
Batches a augmentation sequence.
Declaration
func batches(ofSize size: Int, dropsLastPartialBatch: Bool) -> AugmentationSequence<Base, RandomTransformer, RandomNumberGenerator, Annotation>.BatchedSequenceParameters
- size:
The number of elements contained in each batch.
- dropsLastPartialBatch:
A Boolean value representing whether the last batch should be dropped if it has less than
sizeelements.
Return Value
An async sequence of batches.