在所有維度上拆分資源變量輸入張量。
用法
tf.raw_ops.ReadVariableXlaSplitND(
resource, T, N, num_splits, paddings=[], name=None
)
參數
-
resource
ATensor
類型resource
.輸入張量的資源變量,用於拆分所有維度。 } out_arg { 名稱:"outputs" 說明:< -
T
一個tf.DType
。 -
N
int
即>= 1
。 -
num_splits
ints
的列表。每個維度的拆分方式數。形狀尺寸必須是可整除的。 -
paddings
ints
的可選列表。默認為[]
。每個輸入張量維度的右填充的可選列表,以在拆分前應用。這可用於使維度均勻整除。 -
name
操作的名稱(可選)。
返回
-
N
Tensor
類型為T
的對象列表。
根據給定的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.Real用法及代碼示例
- Python tf.raw_ops.ResourceScatterNdSub用法及代碼示例
- Python tf.raw_ops.ResourceScatterMul用法及代碼示例
- Python tf.raw_ops.ReduceJoin用法及代碼示例
- Python tf.raw_ops.ResourceScatterAdd用法及代碼示例
- Python tf.raw_ops.ResourceScatterMax用法及代碼示例
- Python tf.raw_ops.ResourceScatterMin用法及代碼示例
- Python tf.raw_ops.Relu用法及代碼示例
- Python tf.raw_ops.ReverseV2用法及代碼示例
- Python tf.raw_ops.ResourceGather用法及代碼示例
- Python tf.raw_ops.Reverse用法及代碼示例
- Python tf.raw_ops.Reshape用法及代碼示例
- Python tf.raw_ops.ResourceScatterNdAdd用法及代碼示例
- Python tf.raw_ops.ResourceScatterNdUpdate用法及代碼示例
- Python tf.raw_ops.ResourceScatterSub用法及代碼示例
- Python tf.raw_ops.ResourceScatterUpdate用法及代碼示例
- Python tf.raw_ops.ResourceScatterDiv用法及代碼示例
- Python tf.raw_ops.RegexFullMatch用法及代碼示例
- Python tf.raw_ops.ReverseSequence用法及代碼示例
- Python tf.raw_ops.RaggedGather用法及代碼示例
注:本文由純淨天空篩選整理自tensorflow.org大神的英文原創作品 tf.raw_ops.ReadVariableXlaSplitND。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。