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

21 lines
766 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.Squeeze
=====================
.. py:class:: mindspore.ops.Squeeze(axis=())
返回删除指定 `axis` 中大小为1的维度后的Tensor。
更多参考详见 :func:`mindspore.ops.squeeze`
.. warning::
这是一个实验性API后续可能修改或删除。
参数:
- **axis** (Union[int, tuple(int), list(int)]) - 指定待删除shape的维度索引它会删除给定 `axis` 参数中所有大小为1的维度。如果指定了维度索引其数据类型必须为int32或int64。默认值 ``()``
输入:
- **input** (Tensor) - 用于计算Squeeze的输入Tensorshape为 :math:`(x_1, x_2, ..., x_R)`
输出:
Tensorshape为 :math:`(x_1, x_2, ..., x_S)`