unilab.algos.torch.him_ppo.actor_critic

Classes

class unilab.algos.torch.him_ppo.actor_critic.HIMActorCritic[source]

Bases: Module

Parameters:
is_recurrent = False
__init__(num_actor_obs, num_critic_obs, num_one_step_obs, num_actions, actor_hidden_dims=(512, 256, 128), critic_hidden_dims=(512, 256, 128), activation='elu', init_noise_std=1.0, estimator=None)[source]

Initialize internal Module state, shared by both nn.Module and ScriptModule.

Parameters:
distribution: Normal | None
property action_mean: Tensor
property action_std: Tensor
property entropy: Tensor
reset(dones=None)[source]
Parameters:

dones (Tensor | None)

Return type:

None

forward()[source]

Define the computation performed at every call.

Should be overridden by all subclasses. :rtype: Tensor

Note

Although the recipe for forward pass needs to be defined within this function, one should call the Module instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.

update_distribution(obs_history)[source]
Parameters:

obs_history (Tensor)

Return type:

None

act(obs_history, **kwargs)[source]
Parameters:

obs_history (Tensor)

Return type:

Tensor

get_actions_log_prob(actions)[source]
Parameters:

actions (Tensor)

Return type:

Tensor

act_inference(obs_history, observations=None)[source]
Parameters:

obs_history (Tensor)

Return type:

Tensor

evaluate(critic_observations, **kwargs)[source]
Parameters:

critic_observations (Tensor)

Return type:

Tensor

training: bool