@Namespace(value="tensorflow::ops") @NoOffset @Properties(inherit=tensorflow.class) public class Svd extends Pointer
input
such that
input[..., :, :] = u[..., :, :] * diag(s[..., :, :]) * transpose(v[..., :, :])
python
# a is a tensor containing a batch of matrices.
# s is a tensor of singular values for each matrix.
# u is the tensor containing the left singular vectors for each matrix.
# v is the tensor containing the right singular vectors for each matrix.
s, u, v = svd(a)
s, _, _ = svd(a, compute_uv=False)
Arguments:
* scope: A Scope object
* input: A tensor of shape [..., M, N]
whose inner-most 2 dimensions
form matrices of size [M, N]
. Let P
be the minimum of M
and N
.
Optional attributes (see Attrs
):
* compute_uv: If true, left and right singular vectors will be
computed and returned in u
and v
, respectively.
If false, u
and v
are not set and should never referenced.
* full_matrices: If true, compute full-sized u
and v
. If false
(the default), compute only the leading P
singular vectors.
Ignored if compute_uv
is False
.
Returns:
* Output
s: Singular values. Shape is [..., P]
.
* Output
u: Left singular vectors. If full_matrices
is False
then shape is
[..., M, P]
; if full_matrices
is True
then shape is
[..., M, M]
. Undefined if compute_uv
is False
.
* Output
v: Left singular vectors. If full_matrices
is False
then shape is
[..., N, P]
. If full_matrices
is True
then shape is [..., N, N]
.
Undefined if compute_uv
is false.Modifier and Type | Class and Description |
---|---|
static class |
Svd.Attrs
Optional attribute setters for Svd
|
Pointer.CustomDeallocator, Pointer.Deallocator, Pointer.NativeDeallocator, Pointer.ReferenceCounter
Constructor and Description |
---|
Svd(Pointer p)
Pointer cast constructor.
|
Svd(Scope scope,
Input input) |
Svd(Scope scope,
Input input,
Svd.Attrs attrs) |
Modifier and Type | Method and Description |
---|---|
static Svd.Attrs |
ComputeUv(boolean x) |
static Svd.Attrs |
FullMatrices(boolean x) |
Operation |
operation() |
Svd |
operation(Operation setter) |
Output |
s() |
Svd |
s(Output setter) |
Output |
u() |
Svd |
u(Output setter) |
Output |
v() |
Svd |
v(Output 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 Svd(Pointer p)
Pointer(Pointer)
.Copyright © 2022. All rights reserved.