module emote.nn.gaussian_policy

Classes

class BasePolicy(nn.Module):

Methods

def __init__(self) -> None
def post_process(self, actions) -> None

Post-process a pre-action into a post-action.

Arguments:

  • actions
def infer(self, x) -> None

Samples pre-actions and associated post-actions (actual decisions) from the policy given the encoder input.

Only for use at inference time; defaults to identity transformation. Crucial to reimplement for discrete reparametrized policies.

Arguments:

  • x(Tensor)

class GaussianPolicyHead(nn.Module):

Methods

def __init__(self, hidden_dim, action_dim) -> None
def forward(self, x, epsilon) -> Tensor | Tuple[Tensor]

Sample pre-actions and associated log-probabilities.

Arguments:

  • x(Tensor)
  • epsilon(Tensor | None)

Returns:

  • Direct samples (pre-actions) from the policy log- probabilities associated to those samples

class GaussianMlpPolicy(nn.Module):

Methods

def __init__(self, observation_dim, action_dim, hidden_dims) -> None
def forward(self, obs, epsilon) -> Tensor | Tuple[Tensor]