@Namespace(value="tensorflow::ops") @NoOffset public static class tensorflow.MatrixDiag 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 k dimensions [I, J, K, ..., N], then the output is a
tensor of rank k+1 with dimensions [I, J, K, ..., N, N]where:
output[i, j, k, ..., m, n] = 1{m=n} * diagonal[i, j, k, ..., n].
For example:
# 'diagonal' is [[1, 2, 3, 4], [5, 6, 7, 8]]
and diagonal.shape = (2, 4)
tf.matrix_diag(diagonal) ==> [[[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]]]
which has shape (2, 4, 4)
{@code
Arguments:
* scope: A Scope object
* diagonal: Rank `k`, where `k >= 1`.
Returns:
* `Output`: Rank `k+1`, with `output.shape = diagonal.shape + [diagonal.shape[-1]]`.Pointer.CustomDeallocator, Pointer.Deallocator, Pointer.NativeDeallocator| Constructor and Description |
|---|
MatrixDiag(Pointer p)
Pointer cast constructor.
|
MatrixDiag(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.MatrixDiag |
operation(tensorflow.Operation operation) |
tensorflow.Output |
output() |
tensorflow.MatrixDiag |
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 MatrixDiag(Pointer p)
Pointer.Pointer(Pointer).public MatrixDiag(@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.MatrixDiag operation(tensorflow.Operation operation)
@ByRef public tensorflow.Output output()
public tensorflow.MatrixDiag output(tensorflow.Output output)
Copyright © 2019. All rights reserved.