Copy a tensor setting everything outside a central band in each innermost matrix to zero. The `band` part is computed as follows: Assume `input` has `k` dimensions `[I, J, K, ..., M, N]`, then the output is a tensor with the same shape where `band[i, j, k, ..., m, n] = in_band(m, n) * input[i, j,
(scope *Scope, input tf.Output, num_lower tf.Output, num_upper tf.Output)
| 2744 | // |
| 2745 | // Returns Rank `k` tensor of the same shape as input. The extracted banded tensor. |
| 2746 | func MatrixBandPart(scope *Scope, input tf.Output, num_lower tf.Output, num_upper tf.Output) (band tf.Output) { |
| 2747 | if scope.Err() != nil { |
| 2748 | return |
| 2749 | } |
| 2750 | opspec := tf.OpSpec{ |
| 2751 | Type: "MatrixBandPart", |
| 2752 | Input: []tf.Input{ |
| 2753 | input, num_lower, num_upper, |
| 2754 | }, |
| 2755 | } |
| 2756 | op := scope.AddOperation(opspec) |
| 2757 | return op.Output(0) |
| 2758 | } |
| 2759 | |
| 2760 | // Returns the batched diagonal part of a batched tensor. |
| 2761 | // |