Join us at TensorFlow World, Oct 28-31. Use code TF20 for 20% off select passes. Register now

tfp.math.matrix_rank

Compute the matrix rank; the number of non-zero SVD singular values.

tfp.math.matrix_rank(
    a,
    tol=None,
    validate_args=False,
    name=None
)

Defined in python/math/linalg.py.

Arguments:

  • a: (Batch of) float-like matrix-shaped Tensor(s) which are to be pseudo-inverted.
  • tol: Threshold below which the singular value is counted as "zero". Default value: None (i.e., eps * max(rows, cols) * max(singular_val)).
  • validate_args: When True, additional assertions might be embedded in the graph. Default value: False (i.e., no graph assertions are added).
  • name: Python str prefixed to ops created by this function. Default value: "matrix_rank".

Returns:

  • matrix_rank: (Batch of) int32 scalars representing the number of non-zero singular values.