在所有維度上拆分輸入張量。
用法
tf.raw_ops.XlaSplitND(
input, N, num_splits, paddings=[], name=None
)
參數
-
input
ATensor
.輸入張量以拆分所有維度。 } out_arg { 名稱:"outputs" 說明:< -
N
int
即>= 1
。 -
num_splits
ints
的列表。每個維度的拆分方式數。形狀尺寸必須是可整除的。 -
paddings
ints
的可選列表。默認為[]
。每個輸入張量維度的右填充的可選列表,以在拆分前應用。這可用於使維度均勻整除。 -
name
操作的名稱(可選)。
返回
-
與
input
具有相同類型的N
Tensor
對象的列表。
根據給定的 num_splits 屬性對輸入張量進行切片的操作,可選擇填充切片並返回切片。切片按行優先順序返回。
此操作可以通過 TPU 橋生成。
例如,使用 input
張量:
[[0, 1, 2],
[3, 4, 5],
[6, 7, 8]]
num_splits
:
[2, 2]
和 paddings
:
[1, 1]
預期的outputs
是:
[[0, 1],
[3, 4]]
[[2, 0],
[5, 0]]
[[6, 7],
[0, 0]]
[[8, 0],
[0, 0]]
相關用法
- Python tf.raw_ops.XlaConcatND用法及代碼示例
- Python tf.raw_ops.TPUReplicatedInput用法及代碼示例
- Python tf.raw_ops.Bitcast用法及代碼示例
- Python tf.raw_ops.SelfAdjointEigV2用法及代碼示例
- Python tf.raw_ops.BatchMatMul用法及代碼示例
- Python tf.raw_ops.OneHot用法及代碼示例
- Python tf.raw_ops.ResourceScatterNdSub用法及代碼示例
- Python tf.raw_ops.ReadVariableXlaSplitND用法及代碼示例
- Python tf.raw_ops.GatherV2用法及代碼示例
- Python tf.raw_ops.Expm1用法及代碼示例
- Python tf.raw_ops.BitwiseAnd用法及代碼示例
- Python tf.raw_ops.UniqueWithCounts用法及代碼示例
- Python tf.raw_ops.DecodeGif用法及代碼示例
- Python tf.raw_ops.Size用法及代碼示例
- Python tf.raw_ops.ScatterUpdate用法及代碼示例
- Python tf.raw_ops.ParallelConcat用法及代碼示例
- Python tf.raw_ops.ScatterNdUpdate用法及代碼示例
- Python tf.raw_ops.BatchToSpaceND用法及代碼示例
- Python tf.raw_ops.TensorScatterMax用法及代碼示例
- Python tf.raw_ops.DepthToSpace用法及代碼示例
注:本文由純淨天空篩選整理自tensorflow.org大神的英文原創作品 tf.raw_ops.XlaSplitND。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。