Class Svd<T extends TType>
java.lang.Object
org.tensorflow.op.RawOp
org.tensorflow.op.linalg.Svd<T>
- All Implemented Interfaces:
Op
Computes the singular value decompositions of one or more matrices.
Computes the SVD of each inner matrix in
input such that
input[..., :, :] = u[..., :, :] * diag(s[..., :, :]) * transpose(v[..., :, :])
# 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)
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classSvd.Inputs<T extends TType>static classOptional attributes forSvd -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe name of this op, as known by TensorFlow core engine -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Svd.OptionsSets the computeUv option.create(Scope scope, Operand<T> input, Svd.Options... options) Factory method to create a class wrapping a new Svd operation.static Svd.OptionsfullMatrices(Boolean fullMatrices) Sets the fullMatrices option.s()Gets s.u()Gets u.v()Gets v.
-
Field Details
-
OP_NAME
The name of this op, as known by TensorFlow core engine- See Also:
-
-
Constructor Details
-
Svd
-
-
Method Details
-
create
@Endpoint(describeByClass=true) public static <T extends TType> Svd<T> create(Scope scope, Operand<T> input, Svd.Options... options) Factory method to create a class wrapping a new Svd operation.- Type Parameters:
T- data type forSvdoutput and operands- Parameters:
scope- current scopeinput- A tensor of shape[..., M, N]whose inner-most 2 dimensions form matrices of size[M, N]. LetPbe the minimum ofMandN.options- carries optional attribute values- Returns:
- a new instance of Svd
-
computeUv
Sets the computeUv option.- Parameters:
computeUv- If true, left and right singular vectors will be computed and returned inuandv, respectively. If false,uandvare not set and should never referenced.- Returns:
- this Options instance.
-
fullMatrices
Sets the fullMatrices option.- Parameters:
fullMatrices- If true, compute full-sizeduandv. If false (the default), compute only the leadingPsingular vectors. Ignored ifcompute_uvisFalse.- Returns:
- this Options instance.
-
s
-
u
-
v
-