unilab.algos.torch.hora.models¶
Functions
|
Build the shared HORA core from actor/critic config without mutating inputs. |
Classes
HoraCoreOutput(policy_obs: 'torch.Tensor', trunk_latent: 'torch.Tensor', privileged_latent: 'torch.Tensor', privileged_target: 'torch.Tensor') |
|
Shared-backbone HORA actor-critic with optional adaptation encoder. |
|
Temporal adaptation encoder used by HORA stage-2 distillation. |
- class unilab.algos.torch.hora.models.ProprioAdaptTConv[source]¶
Bases:
ModuleTemporal adaptation encoder used by HORA stage-2 distillation.
- __init__(frame_dim, latent_dim)[source]¶
Initialize internal Module state, shared by both nn.Module and ScriptModule.
- forward(proprio_hist)[source]¶
Define the computation performed at every call.
Should be overridden by all subclasses.
Note
Although the recipe for forward pass needs to be defined within this function, one should call the
Moduleinstance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.
- class unilab.algos.torch.hora.models.HoraCoreOutput[source]¶
Bases:
objectHoraCoreOutput(policy_obs: ‘torch.Tensor’, trunk_latent: ‘torch.Tensor’, privileged_latent: ‘torch.Tensor’, privileged_target: ‘torch.Tensor’)
- Parameters:
Bases:
ModuleShared-backbone HORA actor-critic with optional adaptation encoder.
- Parameters:
Initialize internal Module state, shared by both nn.Module and ScriptModule.
- Parameters:
obs (
TensorDict)- Return type:
- Parameters:
obs (
TensorDict)prefer_student (
bool)
- Return type:
Tensor-only HORA trunk path used by APPO compiled minibatch loss.
- Parameters:
obs (
TensorDict)prefer_student (
bool)
- Return type:
- Parameters:
obs (
TensorDict)prefer_student (
bool)
- Return type:
Build the shared HORA core from actor/critic config without mutating inputs.
- class unilab.algos.torch.hora.models.HoraActorModel[source]¶
Bases:
Module- Parameters:
- is_recurrent: bool = False¶
- __init__(obs, obs_groups, obs_set, output_dim, *, shared_model=None, hidden_dims=(512, 256, 128), activation='elu', obs_normalization=False, distribution_cfg=None, priv_info_dim=None, priv_info_embed_dim=8, priv_mlp_hidden_dims=(256, 128, 8), use_student_encoder=False, proprio_hist_len=30, proprio_frame_dim=None)[source]¶
Initialize internal Module state, shared by both nn.Module and ScriptModule.
- forward(obs, masks=None, hidden_state=None, stochastic_output=False)[source]¶
Define the computation performed at every call.
Should be overridden by all subclasses.
Note
Although the recipe for forward pass needs to be defined within this function, one should call the
Moduleinstance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.
- property distribution: rsl_rl.modules.GaussianDistribution¶
- class unilab.algos.torch.hora.models.HoraCriticModel[source]¶
Bases:
Module- Parameters:
- is_recurrent: bool = False¶
- __init__(obs, obs_groups, obs_set, output_dim, *, shared_model=None, hidden_dims=(512, 256, 128), activation='elu', obs_normalization=False, priv_info_dim=None, priv_info_embed_dim=8, priv_mlp_hidden_dims=(256, 128, 8))[source]¶
Initialize internal Module state, shared by both nn.Module and ScriptModule.
- forward(obs, masks=None, hidden_state=None, stochastic_output=False)[source]¶
Define the computation performed at every call.
Should be overridden by all subclasses.
Note
Although the recipe for forward pass needs to be defined within this function, one should call the
Moduleinstance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.