TF 2.0 is out! Get hands-on practice at TF World, Oct 28-31. Use code TF20 for 20% off select passes. Register now

tfg.geometry.transformation.rotation_matrix_common.is_valid

Determines if a matrix in K-dimensions is a valid rotation matrix.

tfg.geometry.transformation.rotation_matrix_common.is_valid(
    matrix,
    atol=0.001,
    name=None
)

Defined in geometry/transformation/rotation_matrix_common.py.

Determines if a matrix

\(\mathbf{R}\)
is a valid rotation matrix by checking that
\(\mathbf{R}^T\mathbf{R} = \mathbf{I}\)
and
\(\det(\mathbf{R}) = 1\)
.

Args:

  • matrix: A tensor of shape [A1, ..., An, K, K], where the last two dimensions represent a rotation matrix in K-dimensions.
  • atol: The absolute tolerance parameter.
  • name: A name for this op that defaults to "rotation_matrix_common_is_valid".

Returns:

A tensor of type bool and shape [A1, ..., An, 1] where False indicates that the input is not a valid rotation matrix.