jax.experimental.sparse.bcoo_reshape#

jax.experimental.sparse.bcoo_reshape(mat, *, new_sizes, dimensions=None, sharding=None)[source]#

{func}`jax.lax.reshape` 的稀疏实现。

参数:
  • operand – 待重塑的 BCOO 数组。

  • new_sizes (Sequence[int]) – 指定结果形状的整数序列。最终数组的大小必须与输入的大小匹配。必须指定,以确保批量、稀疏和密集维度不会混淆。

  • dimensions (Sequence[int] | None) – 指定输入形状排列顺序的可选整数序列。如果指定,其长度必须与 operand.shape 匹配。此外,维度只能在 mat 的同类维度之间进行排列:批量、稀疏和密集维度不能进行排列。

  • mat (BCOO)

返回:

重塑后的数组。

返回类型:

out