You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

mindspore.ops.Fill.rst 701 B

4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
1234567891011121314151617181920
  1. mindspore.ops.Fill
  2. ==================
  3. .. py:class:: mindspore.ops.Fill()
  4. 创建一个指定shape的Tensor,并用指定值填充。
  5. **输入:**
  6. - **type** (mindspore.dtype) - 指定输出Tensor的数据类型。数据类型只支持 `bool_ <https://www.mindspore.cn/docs/api/zh-CN/master/api_python/mindspore.html#mindspore.dtype>`_ 和 `number <https://www.mindspore.cn/docs/api/zh-CN/master/api_python/mindspore.html#mindspore.dtype>`_ 。
  7. - **shape** (tuple[int]) - 指定输出Tensor的shape。
  8. - **value** (Union(number.Number, bool)) - 用来填充输出Tensor的值。
  9. **输出:**
  10. Tensor。
  11. **异常:**
  12. **TypeError** - `shape` 不是元组。