@Namespace(value="tensorflow::ops") @NoOffset @Properties(inherit=tensorflow.class) public class DiagPart extends Pointer
diagonal
part
of the input
. The diagonal
part is computed as follows:
Assume input
has dimensions [D1,..., Dk, D1,..., Dk]
, then the output is a
tensor of rank k
with dimensions [D1,..., Dk]
where:
diagonal[i1,..., ik] = input[i1, ..., ik, i1,..., ik]
.
For example:
# 'input' is [[1, 0, 0, 0]
[0, 2, 0, 0]
[0, 0, 3, 0]
[0, 0, 0, 4]]
tf.diag_part(input) ==> [1, 2, 3, 4]
Arguments:
* scope: A Scope object
* input: Rank k tensor where k is even and not zero.
Returns:
* Output
: The extracted diagonal.Pointer.CustomDeallocator, Pointer.Deallocator, Pointer.NativeDeallocator, Pointer.ReferenceCounter
Constructor and Description |
---|
DiagPart(Pointer p)
Pointer cast constructor.
|
DiagPart(Scope scope,
Input input) |
Modifier and Type | Method and Description |
---|---|
Input |
asInput() |
Output |
asOutput() |
Output |
diagonal() |
DiagPart |
diagonal(Output setter) |
Node |
node() |
Operation |
operation() |
DiagPart |
operation(Operation setter) |
address, asBuffer, asByteBuffer, availablePhysicalBytes, calloc, capacity, capacity, close, deallocate, deallocate, deallocateReferences, deallocator, deallocator, equals, fill, formatBytes, free, getDirectBufferAddress, getPointer, getPointer, getPointer, getPointer, hashCode, interruptDeallocatorThread, isNull, isNull, limit, limit, malloc, maxBytes, maxPhysicalBytes, memchr, memcmp, memcpy, memmove, memset, offsetAddress, offsetof, offsetof, parseBytes, physicalBytes, physicalBytesInaccurate, position, position, put, realloc, referenceCount, releaseReference, retainReference, setNull, sizeof, sizeof, toString, totalBytes, totalCount, totalPhysicalBytes, withDeallocator, zero
public DiagPart(Pointer p)
Pointer(Pointer)
.public Node node()
Copyright © 2022. All rights reserved.