@Namespace(value="tensorflow::ops") @NoOffset public static class tensorflow.MatrixDiagPart extends Pointer
diagonal part
of the batched input. The diagonal part is computed as follows:
Assume input has k dimensions [I, J, K, ..., M, N], then the output is a
tensor of rank k - 1 with dimensions [I, J, K, ..., min(M, N)] where:
diagonal[i, j, k, ..., n] = input[i, j, k, ..., n, n].
The input must be at least a matrix.
For example:
# 'input' is [[[1, 0, 0, 0]
[0, 2, 0, 0]
[0, 0, 3, 0]
[0, 0, 0, 4]],
[[5, 0, 0, 0]
[0, 6, 0, 0]
[0, 0, 7, 0]
[0, 0, 0, 8]]]
and input.shape = (2, 4, 4)
tf.matrix_diag_part(input) ==> [[1, 2, 3, 4], [5, 6, 7, 8]]
which has shape (2, 4)
Arguments:
* scope: A Scope object
* input: Rank k tensor where k >= 2.
Returns:
* Output: The extracted diagonal(s) having shape
diagonal.shape = input.shape[:-2] + [min(input.shape[-2:])].Pointer.CustomDeallocator, Pointer.Deallocator, Pointer.NativeDeallocator| Constructor and Description |
|---|
MatrixDiagPart(Pointer p)
Pointer cast constructor.
|
MatrixDiagPart(tensorflow.Scope scope,
tensorflow.Input input) |
| Modifier and Type | Method and Description |
|---|---|
tensorflow.Input |
asInput() |
tensorflow.Output |
asOutput() |
tensorflow.Output |
diagonal() |
tensorflow.MatrixDiagPart |
diagonal(tensorflow.Output diagonal) |
tensorflow.Node |
node() |
tensorflow.Operation |
operation() |
tensorflow.MatrixDiagPart |
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 MatrixDiagPart(Pointer p)
Pointer.Pointer(Pointer).public MatrixDiagPart(@Const @ByRef tensorflow.Scope scope, @ByVal tensorflow.Input input)
@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.MatrixDiagPart operation(tensorflow.Operation operation)
@ByRef public tensorflow.Output diagonal()
public tensorflow.MatrixDiagPart diagonal(tensorflow.Output diagonal)
Copyright © 2019. All rights reserved.