tf.raw_ops.ReadVariableXlaSplitND
Stay organized with collections
Save and categorize content based on your preferences.
Splits resource variable input tensor across all dimensions.
tf.raw_ops.ReadVariableXlaSplitND(
resource, T, N, num_splits, paddings=[], name=None
)
An op which splits the resource variable input tensor based on the given
num_splits attribute, pads slices optionally, and returned the slices. Slices
are returned in row-major order.
This op may be generated via the TPU bridge.
For example, with input
tensor:
[[0, 1, 2],
[3, 4, 5],
[6, 7, 8]]
num_splits
:
[2, 2]
and paddings
:
[1, 1]
the expected outputs
is:
[[0, 1],
[3, 4]]
[[2, 0],
[5, 0]]
[[6, 7],
[0, 0]]
[[8, 0],
[0, 0]]
Args |
resource
|
A Tensor of type resource .
Resource variable of input tensor to split across all dimensions.
}
out_arg {
name: "outputs"
description: <
|
T
|
A tf.DType .
|
N
|
An int that is >= 1 .
|
num_splits
|
A list of ints .
Number of ways to split per dimension. Shape dimensions must be evenly
divisible.
|
paddings
|
An optional list of ints . Defaults to [] .
Optional list of right paddings per dimension of input tensor to apply before
splitting. This can be used to make a dimension evenly divisible.
|
name
|
A name for the operation (optional).
|
Returns |
A list of N Tensor objects with type T .
|
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 2024-04-26 UTC.
[null,null,["Last updated 2024-04-26 UTC."],[],[],null,["# tf.raw_ops.ReadVariableXlaSplitND\n\n\u003cbr /\u003e\n\nSplits resource variable input tensor across all dimensions.\n\n#### View aliases\n\n\n**Compat aliases for migration**\n\nSee\n[Migration guide](https://www.tensorflow.org/guide/migrate) for\nmore details.\n\n[`tf.compat.v1.raw_ops.ReadVariableXlaSplitND`](https://www.tensorflow.org/api_docs/python/tf/raw_ops/ReadVariableXlaSplitND)\n\n\u003cbr /\u003e\n\n tf.raw_ops.ReadVariableXlaSplitND(\n resource, T, N, num_splits, paddings=[], name=None\n )\n\nAn op which splits the resource variable input tensor based on the given\nnum_splits attribute, pads slices optionally, and returned the slices. Slices\nare returned in row-major order.\n\nThis op may be generated via the TPU bridge.\n\nFor example, with `input` tensor: \n\n [[0, 1, 2],\n [3, 4, 5],\n [6, 7, 8]]\n\n`num_splits`: \n\n [2, 2]\n\nand `paddings`: \n\n [1, 1]\n\nthe expected `outputs` is: \n\n [[0, 1],\n [3, 4]]\n [[2, 0],\n [5, 0]]\n [[6, 7],\n [0, 0]]\n [[8, 0],\n [0, 0]]\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Args ---- ||\n|--------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `resource` | A `Tensor` of type `resource`. Resource variable of input tensor to split across all dimensions. } out_arg { name: \"outputs\" description: \\\u003c |\n| `T` | A [`tf.DType`](../../tf/dtypes/DType). |\n| `N` | An `int` that is `\u003e= 1`. |\n| `num_splits` | A list of `ints`. Number of ways to split per dimension. Shape dimensions must be evenly divisible. |\n| `paddings` | An optional list of `ints`. Defaults to `[]`. Optional list of right paddings per dimension of input tensor to apply before splitting. This can be used to make a dimension evenly divisible. |\n| `name` | A name for the operation (optional). |\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Returns ------- ||\n|---|---|\n| A list of `N` `Tensor` objects with type `T`. ||\n\n\u003cbr /\u003e"]]