Class SlidingWindow

Inheritance Relationships

Base Type

Class Documentation

class SlidingWindow : public mindspore::dataset::TensorTransform

Construct a tensor from data (only 1-D for now), where each element in the dimension axis is a slice of data starting at the corresponding position, with a specified width.

Public Functions

explicit SlidingWindow(const int32_t width, const int32_t axis = 0)

Constructor.

Parameters
  • width[in] The width of the window. It must be an integer and greater than zero.

  • axis[in] The axis where the sliding window is computed (default=0), axis only supports 0 or -1 for now.

~SlidingWindow() = default

Destructor.