MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / InvertPermutation

Function InvertPermutation

tensorflow/go/op/wrappers.go:2090–2102  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

2088//
2089// Returns 1-D.
2090func 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//

Callers 2

TransposeGradFunction · 0.85
ProdGradFunction · 0.85

Calls 3

ErrMethod · 0.45
AddOperationMethod · 0.45
OutputMethod · 0.45

Tested by

no test coverage detected