Dynamics Models#

Dynamics models used for Dynamics-aware Contrastive Learning (DCL). They are applied to the reference samples during training and selected by name via cebra.CEBRA.dynamics_model_architecture.

Registration and initialization#

cebra.dynamics.init(name, *args, **kwargs)#

Initialize an instance from the registry with the specified arguments.

Parameters:
  • name (str) – The to identify the registered class

  • args – Arguments and keyword arguments to pass to the constructor while instantiating the selected type.

  • kwargs – Arguments and keyword arguments to pass to the constructor while instantiating the selected type.

Returns:

An instance of the specified class.

cebra.dynamics.get_options(pattern=None, limit=None, expand_parametrized=True)#

Retrieve a list of registered names, optionally filtered.

Parameters:
  • pattern (str) – A glob-like pattern (supporting wildcards * and ? to filter the options. Optional argument, defaults to no filtering.

  • limit (int) – An optional maximum amount of options to return, in the order of finding them with the given query.

  • expand_parametrized (bool) – Whether to list classes registered with the parametrize decorator in the options.

Return type:

List[str]

Returns:

All matching names. If a limit was specified, the maximum length is given by the limit.

cebra.dynamics.register(name, base=None, override=False, deprecated=False)#

Decorator to add a new class type to the registry.

Models#

class cebra.dynamics.linear.Identity(*args, **kwargs)#

Bases: Identity

class cebra.dynamics.linear.Linear(latent_dim, bias=True)#

Bases: Linear

class cebra.dynamics.linear.OrthogonalLinear(latent_dim, bias=True, orthogonal_map='matrix_exp', use_trivialization=True)#

Bases: Linear

A LinearDynamicsModel that is parametrized to only allow orthogonal dynamics matrices.