stable_learning_control.algos.common.helpers
Functions that are used in multiple Pytorch and TensorFlow algorithms.
Attributes
Functions
|
Returns a heuristic target entropy for a given action space using the method |
|
Get a given torch activation function. |
|
Calculate the discounted cumsum. |
Module Contents
- stable_learning_control.algos.common.helpers.heuristic_target_entropy(action_space)[source]
Returns a heuristic target entropy for a given action space using the method explained in Haarnoja et al. 2019.
- Parameters:
action_space (
:obj:`gym.spaces`
) – The action space.- Raises:
NotImplementedError – If no heuristic target entropy has yet been implemented for the given action space.
- Returns:
The target entropy.
- Return type:
- stable_learning_control.algos.common.helpers.get_activation_function(activation_fn_name, backend='torch')[source]
Get a given torch activation function.
- Parameters:
- Raises:
ValueError – Thrown if the activation function does not exist within the backend.
- Returns:
The torch activation function.
- Return type: