tf.raw_ops.Unpack
bookmark_borderbookmark
Stay organized with collections
Save and categorize content based on your preferences.
Unpacks a given dimension of a rank-R
tensor into num
rank-(R-1)
tensors.
View aliases
Compat aliases for migration
See
Migration guide for
more details.
tf.compat.v1.raw_ops.Unpack
tf.raw_ops.Unpack(
value, num, axis=0, name=None
)
Unpacks num
tensors from value
by chipping it along the axis
dimension.
For example, given a tensor of shape (A, B, C, D)
;
If axis == 0
then the i'th tensor in output
is the slice value[i, :, :, :]
and each tensor in output
will have shape (B, C, D)
. (Note that the
dimension unpacked along is gone, unlike split
).
If axis == 1
then the i'th tensor in output
is the slice value[:, i, :, :]
and each tensor in output
will have shape (A, C, D)
.
Etc.
This is the opposite of pack
.
Args |
value
|
A Tensor .
1-D or higher, with axis dimension size equal to num .
|
num
|
An int that is >= 0 .
|
axis
|
An optional int . Defaults to 0 .
Dimension along which to unpack. Negative values wrap around, so the
valid range is [-R, R) .
|
name
|
A name for the operation (optional).
|
Returns |
A list of num Tensor objects with the same type as value .
|
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.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-04-26 UTC."],[],[],null,["# tf.raw_ops.Unpack\n\n\u003cbr /\u003e\n\nUnpacks a given dimension of a rank-`R` tensor into `num` rank-`(R-1)` tensors.\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.Unpack`](https://www.tensorflow.org/api_docs/python/tf/raw_ops/Unpack)\n\n\u003cbr /\u003e\n\n tf.raw_ops.Unpack(\n value, num, axis=0, name=None\n )\n\nUnpacks `num` tensors from `value` by chipping it along the `axis` dimension.\nFor example, given a tensor of shape `(A, B, C, D)`;\n\nIf `axis == 0` then the i'th tensor in `output` is the slice `value[i, :, :, :]`\nand each tensor in `output` will have shape `(B, C, D)`. (Note that the\ndimension unpacked along is gone, unlike `split`).\n\nIf `axis == 1` then the i'th tensor in `output` is the slice `value[:, i, :, :]`\nand each tensor in `output` will have shape `(A, C, D)`.\nEtc.\n\nThis is the opposite of `pack`.\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Args ---- ||\n|---------|------------------------------------------------------------------------------------------------------------------------------------|\n| `value` | A `Tensor`. 1-D or higher, with `axis` dimension size equal to `num`. |\n| `num` | An `int` that is `\u003e= 0`. |\n| `axis` | An optional `int`. Defaults to `0`. Dimension along which to unpack. Negative values wrap around, so the valid range is `[-R, R)`. |\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 `num` `Tensor` objects with the same type as `value`. ||\n\n\u003cbr /\u003e"]]