mindspore/docs/api/api_python/ops/mindspore.ops.Padding.rst

21 lines
758 B
ReStructuredText
Raw Permalink 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.ops.Padding
=====================
.. py:class:: mindspore.ops.Padding(pad_dim_size=8)
`ops.Padding` 从2.8.0版本开始已被弃用,并将在未来版本中被移除。
建议使用 :func:`mindspore.ops.pad` 替代。
将输入Tensor的最后一个维度从1扩展到 `pad_dim_size` 其填充值为0。
更多参考详见 :func:`mindspore.ops.padding`
参数:
- **pad_dim_size** (int可选) - 指定填充的大小,待扩展的 `x` 的最后一个维度的值,必须为正数。默认值: ``8``
输入:
- **x** (Tensor) - 输入Tensor二维或者更高维Tensor `x` 的最后一个维度必须为1。数据类型为Number。
输出:
填充后的Tensor。