tf.keras.ops.dsplit
Stay organized with collections
Save and categorize content based on your preferences.
Split an array into multiple sub-arrays depth-wise.
tf.keras.ops.dsplit(
x, indices_or_sections
)
Args |
x
|
Input tensor.
|
indices_or_sections
|
If an integer, N, the tensor will be split into N
equal sections along axis 2. If a 1-D array of sorted integers,
the entries indicate indices at which the tensor will be split
along axis 2.
|
Returns |
|
A list of sub-arrays.
|
Example:
x = keras.ops.arange(16.0).reshape((2, 2, 4))
keras.ops.dsplit(x, 2)
[array([[[ 0., 1.],
[ 4., 5.]],
[[ 8., 9.],
[12., 13.]]]),
array([[[ 2., 3.],
[ 6., 7.]],
[[10., 11.],
[14., 15.]]])]
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates. Some content is licensed under the numpy license.
Last updated 2026-10-31 UTC.
[null,null,["Last updated 2026-10-31 UTC."],[],[]]