jax.experimental.sparse.CSR#

class jax.experimental.sparse.CSR(args, *, shape)[source]#

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

注意:此类与 JAX 转换(如 grad 和 autodiff)的兼容性极低,并且提供的功能非常有限。一般来说,您应该首选 jax.experimental.sparse.BCOO

此外,如果 nse 大于所表示矩阵中非零元素的真实数量,则会出现已知故障。这种情况在 BCOO 中能更好地处理。

参数:

shape (tuple[int, int])

__init__(args, *, shape)[source]#

方法

__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