mindspore/docs/api/api_python/ops/mindspore.ops.EuclideanNorm...

23 lines
1.0 KiB
ReStructuredText
Raw 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.EuclideanNorm
============================
.. py:class:: mindspore.ops.EuclideanNorm(keep_dims=False):
计算Tensor维度上元素的欧几里得范数根据给定的轴对输入进行规约操作。
参数:
- **keep_dims** bool可选 - 如果为True被规约的轴保留为1如果为False不保留给定的这些轴默认值False。
输入:
- **x** (Tensor) - 输入Tensor将被规约数据类型为float16、float32、float64、int8、int16、
int32、int64、complex64、complex128、uint8、uint16、uint32、uint64。
- **axes** (Tensor) - 将进行规约的轴。数据类型为int32、int64。取值范围为 `[-rank(x), rank(x))`
输出:
Tensor与输入 `x` 具有相同的数据类型。
异常:
- **TypeError** - 如果 `keep_dims` 不是一个bool值。
- **TypeError** - 如果 `x` 不是一个Tensor。
- **ValueError** - 如果 `axes` 超出取值范围。