jax.experimental.sparse.bcsr_fromdense#

jax.experimental.sparse.bcsr_fromdense(mat, *, nse=None, n_batch=0, n_dense=0, index_dtype=<class 'jax.numpy.int32'>)[原始碼]#

從密集矩陣建立 BCSR 格式的稀疏矩陣。

參數:
  • mat (ArrayLike) – 要轉換為 BCOO 的陣列。

  • nse (int | None | None) – 每個批次中儲存的元素數量

  • n_batch (int) – 批次維度的數量 (預設值:0)

  • n_dense (int) – 密集維度的數量 (預設值:0)

  • index_dtype (DTypeLike) – 稀疏索引的 dtype (預設值:int32)

傳回值:

矩陣的 BCSR 表示法。

傳回類型:

mat_bcsr