pose_format.tensorflow.pose_representation module

Classes:

TensorflowPoseRepresentation(header[, ...])

Class for pose representations using TensorFlow tensors.

class pose_format.tensorflow.pose_representation.TensorflowPoseRepresentation(header, rep_modules1=[], rep_modules2=[], rep_modules3=[])[source]

Bases: PoseRepresentation

Class for pose representations using TensorFlow tensors.

  • Inherites from PoseRepresentation

This class extends PoseRepresentation and provides methods for manipulating pose representations using TensorFlow tensors.

Methods:

get_points(tensor, points)

Get specific points from a tensor.

group_embeds(embeds)

Group embeddings (list of tensors) along the first dimension.

permute(src, shape)

Permute dimensions of a tensor according to a given shape (tuple).

Parameters:
  • header (PoseHeader) –

  • rep_modules1 (List) –

  • rep_modules2 (List) –

  • rep_modules3 (List) –

get_points(tensor, points)[source]

Get specific points from a tensor.

Parameters:
  • tensor (tf.Tensor) – Tensor.

  • points (List[int]) – Indices/points needed from Tensor

Returns:

Get values from the tensor using the given indices/points

Return type:

tf.Tensor

group_embeds(embeds)[source]

Group embeddings (list of tensors) along the first dimension.

Parameters:

embeds (List[tf.Tensor]) – List of tensors, each with shape (embed_size, Batch, Len).

Returns:

Tensor with shape (Batch, Len, embed_size).

Return type:

tf.Tensor

permute(src, shape)[source]

Permute dimensions of a tensor according to a given shape (tuple).

Parameters:
  • src (tf.Tensor) – tensor to permute

  • shape (tuple) – Desired shape to permute to.

Returns:

The permuted tensor.

Return type:

tf.Tensor