jax.experimental.sparse.CSR#

class jax.experimental.sparse.CSR(args, *, shape)[源代码]#

JAX 中实现的实验性 CSR 矩阵。

注意:此类与 JAX 变换(如 grad 和 autodiff)的兼容性最低,提供的功能也非常有限。总的来说,您应该优先使用 jax.experimental.sparse.BCOO

此外,当 nse 大于表示矩阵的实际非零元素数量时,已知会出现故障。BCOO 在这方面处理得更好。

参数:

shape (tuple[int, int])

__init__(args, *, shape)[源代码]#

方法

__init__(args, *, shape)

block_until_ready()

fromdense(mat, *[, nse, index_dtype])

sum(*args, **kwargs)

todense()

transpose([axes])

tree_flatten()

tree_unflatten(aux_data, children)

属性

T

dtype

ndim

nse

size

data

indices

indptr

shape