Contents

init(features:annotations:batchSize:inputWindowSize:forecastWindowSize:shufflesBatches:)

Creates a batch sequence.

Declaration

init(features: MLShapedArray<Scalar>, annotations: MLShapedArray<Scalar>, batchSize: Int, inputWindowSize: Int, forecastWindowSize: Int, shufflesBatches: Bool = true) throws

Parameters

  • features:

    A shaped array of features, it must have two dimensions.

  • annotations:

    A shaped array of annotations, it must have two dimensions.

  • batchSize:

    The batch size. Must be positive.

  • inputWindowSize:

    The number of input samples. Must be positive.

  • forecastWindowSize:

    The number of prediction samples. Must be positive.

  • shufflesBatches:

    A Boolean value indicating whether to shuffle the batches.