- class torchrl.modules.DreamerActor(out_features, depth=4, num_cells=200, activation_class=<class 'torch.nn.modules.activation.ELU'>, std_bias=5.0, std_min_val=0.0001)¶
Dreamer actor network.
This network is used to predict the action distribution given the the stochastic state and the deterministic belief at the current time step. It outputs the mean and the scale of the action distribution.
out_features (int) – Number of output features.
depth (int, optional) – Number of hidden layers. Defaults to 4.
num_cells (int, optional) – Number of hidden units per layer. Defaults to 200.
activation_class (nn.Module, optional) – Activation class. Defaults to nn.ELU.
std_bias (float, optional) – Bias of the softplus transform. Defaults to 5.0.
std_min_val (float, optional) – Minimum value of the standard deviation. Defaults to 1e-4.
- forward(state, belief)¶
Defines the computation performed at every call.
Should be overridden by all subclasses.
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.