theseus.Objective.retract_vars_sequence

Objective.retract_vars_sequence(delta: Tensor, ordering: Iterable[Manifold], ignore_mask: Optional[Tensor] = None, force_update: bool = False)

Retracts an ordered sequence of variables.

The behavior of this method can be summarized by the following pseudocode:

for var in ordering:
    var.retract(delta[var_idx])

This function assumes that delta is constructed as follows:

delta = torch.cat([delta_v1, delta_v2, ..., delta_vn], dim=-1)

For an ordering [v1 v2 ... vn], and where delta_vi.shape = (batch_size, vi.dof())

Parameters
  • delta (torch.Tensor) – the tensor to use for retract operation.

  • ordering (Iterable[Manifold]) – an ordered iterator of variables to retract. The order must be consistent with delta as explained above.

  • ignore_mask (torch.Tensor, optional) – An ignore mask for batch indices as in update(). Defaults to None.

  • force_update (bool, optional) – if True, disregards the ignore_mask. Defaults to False.