init(features:annotations:inputWindowSize:forecastWindowSize:stride:shufflesElements:)
Creates a batch sequence.
Declaration
init(features: MLShapedArray<Scalar>, annotations: MLShapedArray<Scalar>, inputWindowSize: Int, forecastWindowSize: Int, stride: Int = 1, shufflesElements: Bool = true) throwsParameters
- features:
A shaped array of features, it must have two dimensions.
- annotations:
A shaped array of annotations, it must have two dimensions.
- inputWindowSize:
The number of input samples. Must be positive.
- forecastWindowSize:
The number of prediction samples. Must be positive.
- stride:
The number of samples between windows. Must be positive. Defaults to 1.
- shufflesElements:
A Boolean value indicating whether to shuffle the elements. Defaults to true.