寺库去年营收37.4亿元同增44.2%

paddle.incubate.asp. calculate_density ( x ) [源代码] ?
百度 他曾经受过不公平的待遇,但他对这些毫无所求,只专注学术。

返回输入 tensor 的密度。

参数?

x (nparray) – 输入 tensor。

返回?

float - x 的密度

代码示例?

>>> 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