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.OnesLike.rst 393 B

4 years ago
4 years ago
4 years ago
123456789101112131415161718
  1. mindspore.ops.OnesLike
  2. ======================
  3. .. py:class:: mindspore.ops.OnesLike()
  4. 返回值为1的Tensor,shape和数据类型与输入相同。
  5. **输入:**
  6. - **input_x** (Tensor) - 任意维度的Tensor。
  7. **输出:**
  8. Tensor,具有与 `input_x` 相同的shape和类型,并填充了1。
  9. **异常:**
  10. - **TypeError** - `input_x` 不是Tensor。