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.Log.rst 706 B

4 years ago
4 years ago
4 years ago
4 years ago
123456789101112131415161718192021222324252627282930
  1. mindspore.ops.Log
  2. =================
  3. .. py:class:: mindspore.ops.Log()
  4. 逐元素返回Tensor的自然对数。
  5. .. math::
  6. y_i = log_e(x_i)
  7. .. warning::
  8. 如果算子Log的输入值在(0,0.01]或[0.95,1.05]范围内,则输出精度可能会存在误差。
  9. .. note::
  10. Ascend上输入Tensor的维度要小于等于8,CPU上输入Tensor的维度要小于8。
  11. **输入:**
  12. - **x** (Tensor) - 任意维度的输入Tensor。该值必须大于0。
  13. **输出:**
  14. Tensor,具有与 `x` 相同的shape。
  15. **异常:**
  16. - **TypeError** - `x` 不是Tensor。
  17. - **TypeError** - `x` 的数据类型不是float16、float32或float64。