mindspore/docs/api/api_python/mint/mindspore.mint.nn.Reflectio...

27 lines
944 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.mint.nn.ReflectionPad1d
=================================
.. py:class:: mindspore.mint.nn.ReflectionPad1d(padding)
使用输入边界的反射对输入的最后1维 `input` 进行填充。
更多参考详见 :func:`mindspore.mint.nn.functional.pad`
.. warning::
这是一个实验性API后续可能修改或删除。
参数:
- **padding** (Union[int, tuple, list]) - 指定填充的大小。
输入:
- **input** (Tensor) - 输入Tensor2D或3D。shape为 :math:`(C, W_{in})`:math:`(N, C, W_{in})`
输出:
Tensor填充后的Tensor。
异常:
- **TypeError** - `padding` 不是一个integer或包含2个int的tuple或list。
- **TypeError** - `input` 不是Tensor。
- **ValueError** - `padding` 含有负数。
- **ValueError** - `padding` 是tuple或list且长度和Tensor的维度不匹配。