#include <array_ops.h>
Computes the inverse permutation of a tensor.
This operation computes the inverse of an index permutation. It takes a 1-D integer tensor x, which represents the indices of a zero-based array, and swaps each value with its index position. In other words, for an output tensor y and an input tensor x, this operation computes the following:
y[x[i]] = i for i in [0, 1, ..., len(x) - 1]
The values must include 0. There can be no duplicate values or negative values.
For example:
# tensor `x` is [3, 4, 0, 2, 1] invert_permutation(x) ==> [2, 4, 3, 0, 1]
Arguments:
Returns:
Output: 1-D. | Constructors and Destructors | |
|---|---|
InvertPermutation(const ::tensorflow::Scope & scope, ::tensorflow::Input x) |
| Public attributes | |
|---|---|
y | |
| Public functions | |
|---|---|
node() const | ::tensorflow::Node * |
operator::tensorflow::Input() const | |
operator::tensorflow::Output() const | |
::tensorflow::Output y
InvertPermutation( const ::tensorflow::Scope & scope, ::tensorflow::Input x )
::tensorflow::Node * node() const
operator::tensorflow::Input() const
operator::tensorflow::Output() const
© 2018 The TensorFlow Authors. All rights reserved.
Licensed under the Creative Commons Attribution License 3.0.
Code samples licensed under the Apache 2.0 License.
https://www.tensorflow.org/api_docs/cc/class/tensorflow/ops/invert-permutation.html