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

20 lines
746 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.FillV2
====================
.. py:class:: mindspore.ops.FillV2
创建一个Tensor其shape由 `shape` 指定,其值则由 `value` 进行填充。
输入:
- **shape** (Union[Tuple[int], Tensor[int]]) - 1-D Tensor或Tuple指定了输出Tensor的shape。
其数据类型必须是int32或int64。
- **value** (Tensor) - `value` 是零维Tensor其值用于填充输出 `y`
输出:
- **y** (Tensor) - Tensor其shape和值如上所述。
异常:
- **TypeError** - 如果 `shape` 不是1-D Tensor或Tuple。
- **TypeError** - 如果 `shape` 的数据类型不是int32或者int64。
- **ValueError** - 如果 `value` 不是零维Tensor。