jax.scipy.special.entr# jax.scipy.special.entr(x)[源代码]# 熵函数 JAX 对 scipy.special.entr 的实现。 \[\begin{split}\mathrm{entr}(x) = \begin{cases} -x\log(x) & x > 0 \\ 0 & x = 0\\ -\infty & \mathrm{otherwise} \end{cases}\end{split}\] 参数: x (ArrayLike) – 类数组,实数值。 返回: 包含熵值的数组。 返回类型: Array 另请参阅 jax.scipy.special.kl_div() jax.scipy.special.rel_entr()