mindspore/docs/api/api_python/dataset_text/mindspore.dataset.text.Slid...

16 lines
624 B
ReStructuredText
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

mindspore.dataset.text.SlidingWindow
====================================
.. py:class:: mindspore.dataset.text.SlidingWindow(width, axis=0)
在输入数据的某个维度上进行滑窗切分处理当前仅支持处理1-D的Tensor。
参数:
- **width** (int) - 窗口的宽度,它必须是整数并且大于零。
- **axis** (int, 可选) - 计算滑动窗口的轴。默认值0。
异常:
- **TypeError** - 参数 `width` 的类型不为int。
- **ValueError** - 参数 `width` 的值不为正数。
- **TypeError** - 参数 `axis` 的类型不为int。