tf.svd(tensor, compute_uv=True, full_matrices=False, name=None)
Computes the singular value decompositions of one or more matrices.
Computes the SVD of each inner matrix in tensor such that tensor[..., :, :] = u[..., :, :] * diag(s[..., :, :]) * transpose(v[..., :,
:])
# a is a tensor.
# s is a tensor of singular values.
# u is a tensor of left singular vectors.
# v is a tensor of right singular vectors.
s, u, v = svd(a)
s = svd(a, compute_uv=False)
Args:
matrix: Tensor of shape [..., M, N].