jax.numpy.dsplit#
- jax.numpy.dsplit(ary, indices_or_sections)[原始碼]#
深度方向分割陣列為子陣列。
numpy.dsplit()
的 JAX 實作。詳細資訊請參閱
jax.numpy.split()
的文件。dsplit
等同於axis=2
的split
。範例
>>> x = jnp.arange(12).reshape(3, 1, 4) >>> print(x) [[[ 0 1 2 3]] [[ 4 5 6 7]] [[ 8 9 10 11]]] >>> x1, x2 = jnp.dsplit(x, 2) >>> print(x1) [[[0 1]] [[4 5]] [[8 9]]] >>> print(x2) [[[ 2 3]] [[ 6 7]] [[10 11]]]
另請參閱
jax.numpy.split()
:沿任何軸分割陣列。jax.numpy.vsplit()
:垂直分割,即沿 axis=0jax.numpy.hsplit()
:水平分割,即沿 axis=1jax.numpy.array_split()
:類似split
,但允許indices_or_sections
為無法均勻分割陣列大小的整數。