def make_policy(representation_dim: int, action_dim: int, distribution: str, hidden_dimensions: List[int], nonlinearity: str, num_components: Optional[int]=None, num_actions: Optional[int]=None, action_bound: Optional[float]=None, layernorm: bool=False, log_param_min: float=(- 5), log_param_max: float=2) -> Union[(DiscretePolicy, DiagonalNormalPolicy, DiagonalGMMPolicy, GeneralizedBetaPolicy)]:
    'Constructs a policy network from a given config.\n\n    The following config keys need to be specified:\n        - "representation_dim": int\n        - "action_dim": int\n        - "distribution": str\n        - "num_components": int\n        - "action_bound": float\n        - "hidden_dimensions": List[int]\n        - "nonlinearity": str\n        - "layernorm": bool\n        - "log_param_min": Optional[float]\n        - "log_param_max": Optional[float]\n\n    Parameters\n    ----------\n    representation_dim: int\n        Dimensionality of the vector state space of the environment.\n    action_dim: int\n        Number of action dimensions in the environment.\n    distribution: str\n        Name of the policy distribution as string ["discrete", "beta", "normal"].\n    hidden_dimensions: List[int]\n        List specification of the MLP policy. Each int element in the list represents a hidden\n        layer in the  network with the respective number of neurons.\n    nonlinearity: str\n        Nonlinearity (activation function) used in the policy network.\n    num_components: Optional[int] = None\n        Number of components for mixture distributions.\n    num_actions: Optional[int] = None\n        Number of available actions. Used in the discrete policy.\n    action_bound: Optional[float] = None\n        Action bounds for the squashed normal or squashed GMM policy.\n    layernorm: bool = False\n        Use Layernorm in the policy network if set to True.\n    log_param_min: float = -5\n        Lower bound of the learned log parameters (standard deviation for Normal distributions).\n    log_param_max: float = 2\n        Upper bound of the learned log parameters.\n\n    Returns\n    -------\n    Union[DiscretePolicy, DiagonalNormalPolicy, DiagonalGMMPolicy, GeneralizedBetaPolicy]\n        Policy network intance.\n    '
    distribution = _process_str(distribution)
    nonlinearity = _process_str(nonlinearity)
    if (distribution == 'discrete'):
        return DiscretePolicy(representation_dim=representation_dim, action_dim=action_dim, num_actions=cast(int, num_actions), hidden_dimensions=hidden_dimensions, nonlinearity=nonlinearity, layernorm=layernorm)
    elif (distribution == 'beta'):
        assert num_components
        return GeneralizedBetaPolicy(representation_dim=representation_dim, action_dim=action_dim, action_bound=cast(float, action_bound), hidden_dimensions=hidden_dimensions, nonlinearity=nonlinearity, layernorm=layernorm, log_param_min=log_param_min, log_param_max=log_param_max)
    else:
        assert num_components
        if (1 < num_components):
            return DiagonalGMMPolicy(representation_dim=representation_dim, action_dim=action_dim, num_components=num_components, action_bound=action_bound, hidden_dimensions=hidden_dimensions, nonlinearity=nonlinearity, layernorm=layernorm, log_param_min=log_param_min, log_param_max=log_param_max)
        else:
            return DiagonalNormalPolicy(representation_dim=representation_dim, action_dim=action_dim, action_bound=action_bound, hidden_dimensions=hidden_dimensions, nonlinearity=nonlinearity, layernorm=layernorm, log_param_min=log_param_min, log_param_max=log_param_max)
Constructs a policy network from a given config.

The following config keys need to be specified:
    - "representation_dim": int
    - "action_dim": int
    - "distribution": str
    - "num_components": int
    - "action_bound": float
    - "hidden_dimensions": List[int]
    - "nonlinearity": str
    - "layernorm": bool
    - "log_param_min": Optional[float]
    - "log_param_max": Optional[float]

Parameters
----------
representation_dim: int
    Dimensionality of the vector state space of the environment.
action_dim: int
    Number of action dimensions in the environment.
distribution: str
    Name of the policy distribution as string ["discrete", "beta", "normal"].
hidden_dimensions: List[int]
    List specification of the MLP policy. Each int element in the list represents a hidden
    layer in the  network with the respective number of neurons.
nonlinearity: str
    Nonlinearity (activation function) used in the policy network.
num_components: Optional[int] = None
    Number of components for mixture distributions.
num_actions: Optional[int] = None
    Number of available actions. Used in the discrete policy.
action_bound: Optional[float] = None
    Action bounds for the squashed normal or squashed GMM policy.
layernorm: bool = False
    Use Layernorm in the policy network if set to True.
log_param_min: float = -5
    Lower bound of the learned log parameters (standard deviation for Normal distributions).
log_param_max: float = 2
    Upper bound of the learned log parameters.

Returns
-------
Union[DiscretePolicy, DiagonalNormalPolicy, DiagonalGMMPolicy, GeneralizedBetaPolicy]
    Policy network intance.
def make_policy(representation_dim: int, action_dim: int, distribution: str, hidden_dimensions: List[int], nonlinearity: str, num_components: Optional[int]=None, num_actions: Optional[int]=None, action_bound: Optional[float]=None, layernorm: bool=False, log_param_min: float=(- 5), log_param_max: float=2) -> Union[(DiscretePolicy, DiagonalNormalPolicy, DiagonalGMMPolicy, GeneralizedBetaPolicy)]:
    'Constructs a policy network from a given config.\n\n    The following config keys need to be specified:\n        - "representation_dim": int\n        - "action_dim": int\n        - "distribution": str\n        - "num_components": int\n        - "action_bound": float\n        - "hidden_dimensions": List[int]\n        - "nonlinearity": str\n        - "layernorm": bool\n        - "log_param_min": Optional[float]\n        - "log_param_max": Optional[float]\n\n    Parameters\n    ----------\n    representation_dim: int\n        Dimensionality of the vector state space of the environment.\n    action_dim: int\n        Number of action dimensions in the environment.\n    distribution: str\n        Name of the policy distribution as string ["discrete", "beta", "normal"].\n    hidden_dimensions: List[int]\n        List specification of the MLP policy. Each int element in the list represents a hidden\n        layer in the  network with the respective number of neurons.\n    nonlinearity: str\n        Nonlinearity (activation function) used in the policy network.\n    num_components: Optional[int] = None\n        Number of components for mixture distributions.\n    num_actions: Optional[int] = None\n        Number of available actions. Used in the discrete policy.\n    action_bound: Optional[float] = None\n        Action bounds for the squashed normal or squashed GMM policy.\n    layernorm: bool = False\n        Use Layernorm in the policy network if set to True.\n    log_param_min: float = -5\n        Lower bound of the learned log parameters (standard deviation for Normal distributions).\n    log_param_max: float = 2\n        Upper bound of the learned log parameters.\n\n    Returns\n    -------\n    Union[DiscretePolicy, DiagonalNormalPolicy, DiagonalGMMPolicy, GeneralizedBetaPolicy]\n        Policy network intance.\n    '
    distribution = _process_str(distribution)
    nonlinearity = _process_str(nonlinearity)
    if (distribution == 'discrete'):
        return DiscretePolicy(representation_dim=representation_dim, action_dim=action_dim, num_actions=cast(int, num_actions), hidden_dimensions=hidden_dimensions, nonlinearity=nonlinearity, layernorm=layernorm)
    elif (distribution == 'beta'):
        assert num_components
        return GeneralizedBetaPolicy(representation_dim=representation_dim, action_dim=action_dim, action_bound=cast(float, action_bound), hidden_dimensions=hidden_dimensions, nonlinearity=nonlinearity, layernorm=layernorm, log_param_min=log_param_min, log_param_max=log_param_max)
    else:
        assert num_components
        if (1 < num_components):
            return DiagonalGMMPolicy(representation_dim=representation_dim, action_dim=action_dim, num_components=num_components, action_bound=action_bound, hidden_dimensions=hidden_dimensions, nonlinearity=nonlinearity, layernorm=layernorm, log_param_min=log_param_min, log_param_max=log_param_max)
        else:
            return DiagonalNormalPolicy(representation_dim=representation_dim, action_dim=action_dim, action_bound=action_bound, hidden_dimensions=hidden_dimensions, nonlinearity=nonlinearity, layernorm=layernorm, log_param_min=log_param_min, log_param_max=log_param_max)