Loading [Contrib]/a11y/accessibility-menu.js
\u200E
calculate_density
-
paddle.incubate.asp.
calculate_density
(
x
)
[源代码]
返回输入 tensor 的密度。
参数
x (nparray) – 输入 tensor。
代码示例
>>> import paddle
>>> import numpy as np
>>> x = np.array([[0, 1, 3, 0],
... [1, 1, 0, 1]])
>>> out = paddle.incubate.asp.calculate_density(x)
>>> print(out)
0.625
文档反馈