Contents

batches(ofSize:dropsLastPartialBatch:)

Batches a augmentation sequence.

Declaration

func batches(ofSize size: Int, dropsLastPartialBatch: Bool) -> AugmentationSequence<Base, RandomTransformer, RandomNumberGenerator, Annotation>.BatchedSequence

Parameters

  • 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 size elements.

Return Value

An async sequence of batches.

See Also

Batching an augmentation sequence