Shortcuts

RSSMPosterior

class torchrl.modules.RSSMPosterior(hidden_dim=200, state_dim=30, scale_lb=0.1)[source]

The posterior network of the RSSM.

This network takes as input the belief and the associated encoded observation. It returns the parameters of the posterior as well as a state sampled according to this distribution.

Reference: https://arxiv.org/abs/1811.04551

Parameters:
  • hidden_dim (int, optional) – Number of hidden units in the linear network. Defaults to 200.

  • state_dim (int, optional) – Size of the state. Defaults to 30.

  • scale_lb (float, optional) – Lower bound of the scale of the state distribution. Defaults to 0.1.

forward(belief, obs_embedding)[source]

Define the computation performed at every call.

Should be overridden by all subclasses.

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.

Docs

Access comprehensive developer documentation for PyTorch

View Docs

Tutorials

Get in-depth tutorials for beginners and advanced developers

View Tutorials

Resources

Find development resources and get your questions answered

View Resources