unilab.algos.torch.hora.sac_models¶
HORA SAC actor models.
Classes
Privileged HORA teacher actor for SAC. |
- class unilab.algos.torch.hora.sac_models.HoraSACActor[source]¶
Bases:
ModulePrivileged HORA teacher actor for SAC.
The named modules below are intentionally stable for later distillation:
priv_encoder,actor_trunk,action_mean_head, andaction_logstd_head.- Parameters:
- action_scale: torch.Tensor¶
- action_bias: torch.Tensor¶
- __init__(obs_dim, priv_info_dim, action_dim, *, hidden_dim=512, priv_info_embed_dim=9, priv_mlp_hidden_dims=(256, 128, 9), log_std_max=0.0, log_std_min=-5.0, use_tanh=True, use_layer_norm=True, device='cpu', action_scale=None, action_bias=None)[source]¶
Initialize internal Module state, shared by both nn.Module and ScriptModule.
- forward(obs, priv_info)[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.
- as_export_module()[source]¶
Return a wrapper with explicit actor/priv inputs for ONNX export.
- Return type: