ConvLSTM

class ConvLSTM(hidden_units: int = 256, lstm_layers: int = 1, *args, **kwargs)

Bases: pandemonium.networks.bodies.ConvBody

A CNN with a recurrent LSTM layer on top.

Used for tackling partial observability in the environment. A comprehensive example is given in https://arxiv.org/pdf/1507.06527.pdf Deep Recurrent Q-Learning for Partially Observable MDPs.

Attributes Summary

hidden_state

lstm_state

memory_state

Methods Summary

forward(self, x, lstm_state, NoneType] = None)

Defines the computation performed at every call.

Attributes Documentation

hidden_state
lstm_state
memory_state

Methods Documentation

forward(self, x: torch.Tensor, lstm_state: Union[tuple, NoneType] = None)

Defines 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.