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
deltais constructed as follows:delta = torch.cat([delta_v1, delta_v2, ..., delta_vn], dim=-1)
For an ordering
[v1 v2 ... vn], and wheredelta_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
deltaas explained above.ignore_mask (torch.Tensor, optional) – An ignore mask for batch indices as in
update(). Defaults toNone.force_update (bool, optional) – if
True, disregards theignore_mask. Defaults toFalse.