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

15 lines
383 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.fill
==================
.. py:function:: mindspore.ops.fill(type, shape, value)
创建tensor用指定值填充。
参数:
- **type** (mindspore.dtype) - 指定数据类型。
- **shape** (Union(Tensor, tuple[int])) - 指定的shape。
- **value** (Union(Tensor, number.Number, bool)) - 指定值。
返回:
Tensor