Shortcuts

ObsDecoder

class torchrl.modules.ObsDecoder(channels=32, num_layers=4, kernel_sizes=None, depth=None)[source]

Observation decoder network.

Takes the deterministic state and the stochastic belief and decodes it into a pixel observation.

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

Parameters:
  • channels (int, optional) – Number of hidden units in the last layer. Defaults to 32.

  • num_layers (int, optional) – Depth of the network. Defaults to 4.

  • kernel_sizes (int or list of int, optional) – the kernel_size of each layer. Defaults to [5, 5, 6, 6] if num_layers if 4, else [5] * num_layers.

forward(state, rnn_hidden)[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