@Namespace(value="tensorflow::ops") @NoOffset public static class tensorflow.MatrixBandPart extends Pointer
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, k, ..., m, n].
The indicator function
in_band(m, n) = (num_lower < 0 || (m-n) <= num_lower)) &&
(num_upper < 0 || (n-m) <= num_upper).
For example:
# if 'input' is [[ 0, 1, 2, 3]
[-1, 0, 1, 2]
[-2, -1, 0, 1]
[-3, -2, -1, 0]],
tf.matrix_band_part(input, 1, -1) ==> [[ 0, 1, 2, 3]
[-1, 0, 1, 2]
[ 0, -1, 0, 1]
[ 0, 0, -1, 0]],
tf.matrix_band_part(input, 2, 1) ==> [[ 0, 1, 0, 0]
[-1, 0, 1, 0]
[-2, -1, 0, 1]
[ 0, -2, -1, 0]]
Useful special cases:
tf.matrix_band_part(input, 0, -1) ==> Upper triangular part.
tf.matrix_band_part(input, -1, 0) ==> Lower triangular part.
tf.matrix_band_part(input, 0, 0) ==> Diagonal.
Arguments:
* scope: A Scope object
* input: Rank k tensor.
* num_lower: 0-D tensor. Number of subdiagonals to keep. If negative, keep entire
lower triangle.
* num_upper: 0-D tensor. Number of superdiagonals to keep. If negative, keep
entire upper triangle.
Returns:
* Output: Rank k tensor of the same shape as input. The extracted banded tensor.Pointer.CustomDeallocator, Pointer.Deallocator, Pointer.NativeDeallocator| Constructor and Description |
|---|
MatrixBandPart(Pointer p)
Pointer cast constructor.
|
MatrixBandPart(tensorflow.Scope scope,
tensorflow.Input input,
tensorflow.Input num_lower,
tensorflow.Input num_upper) |
| Modifier and Type | Method and Description |
|---|---|
tensorflow.Input |
asInput() |
tensorflow.Output |
asOutput() |
tensorflow.Output |
band() |
tensorflow.MatrixBandPart |
band(tensorflow.Output band) |
tensorflow.Node |
node() |
tensorflow.Operation |
operation() |
tensorflow.MatrixBandPart |
operation(tensorflow.Operation operation) |
address, asBuffer, asByteBuffer, availablePhysicalBytes, calloc, capacity, capacity, close, deallocate, deallocate, deallocateReferences, deallocator, deallocator, equals, fill, formatBytes, free, hashCode, isNull, limit, limit, malloc, maxBytes, maxPhysicalBytes, memchr, memcmp, memcpy, memmove, memset, offsetof, parseBytes, physicalBytes, position, position, put, realloc, setNull, sizeof, toString, totalBytes, totalPhysicalBytes, withDeallocator, zeropublic MatrixBandPart(Pointer p)
Pointer.Pointer(Pointer).public MatrixBandPart(@Const @ByRef tensorflow.Scope scope, @ByVal tensorflow.Input input, @ByVal tensorflow.Input num_lower, @ByVal tensorflow.Input num_upper)
@ByVal @Name(value="operator tensorflow::Output") public tensorflow.Output asOutput()
@ByVal @Name(value="operator tensorflow::Input") public tensorflow.Input asInput()
public tensorflow.Node node()
@ByRef public tensorflow.Operation operation()
public tensorflow.MatrixBandPart operation(tensorflow.Operation operation)
@ByRef public tensorflow.Output band()
public tensorflow.MatrixBandPart band(tensorflow.Output band)
Copyright © 2019. All rights reserved.