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 tenso
(scope *Scope, x tf.Output)
| 2088 | // |
| 2089 | // Returns 1-D. |
| 2090 | func InvertPermutation(scope *Scope, x tf.Output) (y tf.Output) { |
| 2091 | if scope.Err() != nil { |
| 2092 | return |
| 2093 | } |
| 2094 | opspec := tf.OpSpec{ |
| 2095 | Type: "InvertPermutation", |
| 2096 | Input: []tf.Input{ |
| 2097 | x, |
| 2098 | }, |
| 2099 | } |
| 2100 | op := scope.AddOperation(opspec) |
| 2101 | return op.Output(0) |
| 2102 | } |
| 2103 | |
| 2104 | // Reshapes a tensor. |
| 2105 | // |
no test coverage detected