Maps points from a unit square to a unit sphere.
tfg.math.math_helpers.square_to_spherical_coordinates(
point_2d: TensorLike,
name: str = 'math_square_to_spherical_coordinates'
) -> TensorLike
Note |
In the following, A1 to An are optional batch dimensions.
|
Args |
point_2d
|
A tensor of shape [A1, ..., An, 2] with values in [0,1].
|
name
|
A name for this op. Defaults to
"math_square_to_spherical_coordinates".
|
Returns |
A tensor of shape [A1, ..., An, 2] with [..., 0] having values in
[0.0, pi] and [..., 1] with values in [0.0, 2pi].
|
Raises |
ValueError
|
if the shape of point_2d is not supported.
|
InvalidArgumentError
|
if at least an element of point_2d is outside of
[0,1].
|