pose_format.tensorflow.representation.distance module
Classes:
A class to represent the Euclidean distance between two sets of points. |
- class pose_format.tensorflow.representation.distance.DistanceRepresentation[source]
Bases:
objectA class to represent the Euclidean distance between two sets of points.
Methods:
distance(p1s, p2s)Computes the Euclidean distance between two sets of points.
- distance(p1s, p2s)[source]
Computes the Euclidean distance between two sets of points.
- Parameters:
p1s (tf.Tensor) – First set of points with shape (Points, Batch, Len, Dims).
p2s (tf.Tensor) – Second set of points with shape (Points, Batch, Len, Dims).
- Returns:
A tensor representing the Euclidean distance between the two points with shape (Points, Batch, Len).
- Return type:
tf.Tensor
Note
The function computes the difference between the two sets of points, squares the differences, sums the squared differences along the last axis, and then takes the square root to calculate the Euclidean distance.