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

32 lines
2.2 KiB
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.LuUnpack
======================
.. py:class:: mindspore.ops.LuUnpack(unpack_data=True, unpack_pivots=True)
从Tensor的LU分解中解压缩 `LU_data``LU_pivots`
参数:
- **unpack_data** (bool可选) - 是否解压缩 `LU_data` 的标志。如果为False则返回的L和U为None。默认值True。
- **unpack_pivots** (bool可选) - 是否将 `LU_pivots` 解压缩为置换矩阵P的标志。如果为False则返回的P为None。默认值True。
输入:
- **LU_data** (Tensor) - Tensor打包的LU分解数据shape为 :math:`(*, M, N)` ,其中 :math:`*` 为batch维度其中 `*` 是batch
维度数据类型为int8、uint8、int16、int32、int64、float16、float32、float64。 `LU_data` 的维度必须等于或大于2。
- **LU_pivots** (Tensor) - Tensor打包的LU分枢轴shape为 :math:`(*, min(M, N))` ,其中 :math:`*` 为batch维度其中 `*` 是batch
维度数据类型为int8、uint8、int16、int32或int64。
输出:
- **pivots** (Tensor) - LU分解的置换矩阵shape为 :math:`[*, M, M]` ,数据类型与 `LU_data` 相同。
- **L** (Tensor) - LU分解的L矩阵数据类型与 `LU_data` 相同。
- **U** (Tensor) - LU分解的U矩阵数据类型与 `LU_data` 相同。
异常:
- **TypeError** - 若 `LU_data` 的数据类型不是以下之一int8、uint8、int16、int32、int64、float16、float32、float64。
- **TypeError** - 若 `LU_pivots` 的数据类型不是以下之一int8、uint8、int16、int32、int64。
- **ValueError** - 若 `LU_data` 的维度小于2。
- **ValueError** - 若 `LU_pivots` 的维度小于1。
- **ValueError** - 若 `LU_pivots` 最后一维的大小不等于 `LU_data` 的最后两维的较小者。
- **ValueError** - 若 `LU_data``LU_pivots` 的batch维度不匹配。
- **ValueError** - 在CPU平台上`LU_pivots` 的值不在 :math:`[1, LU\_data.shape[-2]]` 范围内。
- **RuntimeError** - 在Ascend平台上`LU_pivots` 的值不在 :math:`[1, LU\_data.shape[-2]]` 范围内。