mindspore2022/docs/api/api_python/ops/mindspore.ops.ZerosLike.rst

19 lines
468 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.ZerosLike
=======================
.. py:class:: mindspore.ops.ZerosLike()
返回值为0的Tensor其shape和数据类型与输入Tensor相同。
**输入:**
- **input_x** (Tensor) - 任意维度的输入Tensor。数据类型为int32、int64、float16或float32。
**输出:**
Tensor具有与 `input_x` 相同的shape和数据类型并填充了0。
**异常:**
- **TypeError** - `input_x` 不是Tensor。