@Namespace(value="tensorflow::ops") @NoOffset public static class tensorflow.Diag extends Pointer
diagonal, this operation returns a tensor with the diagonal and
everything else padded with zeros. The diagonal is computed as follows:
Assume diagonal has dimensions [D1,..., Dk], then the output is a tensor of
rank 2k with dimensions [D1,..., Dk, D1,..., Dk] where:
output[i1,..., ik, i1,..., ik] = diagonal[i1, ..., ik] and 0 everywhere else.
For example:
# 'diagonal' is [1, 2, 3, 4]
tf.diag(diagonal) ==> [[1, 0, 0, 0]
[0, 2, 0, 0]
[0, 0, 3, 0]
[0, 0, 0, 4]]
Arguments:
* scope: A Scope object
* diagonal: Rank k tensor where k is at most 1.
Returns:
* Output: The output tensor.Pointer.CustomDeallocator, Pointer.Deallocator, Pointer.NativeDeallocator| Constructor and Description |
|---|
Diag(Pointer p)
Pointer cast constructor.
|
Diag(tensorflow.Scope scope,
tensorflow.Input diagonal) |
| Modifier and Type | Method and Description |
|---|---|
tensorflow.Input |
asInput() |
tensorflow.Output |
asOutput() |
tensorflow.Node |
node() |
tensorflow.Operation |
operation() |
tensorflow.Diag |
operation(tensorflow.Operation operation) |
tensorflow.Output |
output() |
tensorflow.Diag |
output(tensorflow.Output output) |
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 Diag(Pointer p)
Pointer.Pointer(Pointer).public Diag(@Const @ByRef tensorflow.Scope scope, @ByVal tensorflow.Input diagonal)
@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.Diag operation(tensorflow.Operation operation)
@ByRef public tensorflow.Output output()
public tensorflow.Diag output(tensorflow.Output output)
Copyright © 2019. All rights reserved.