benchmarl.models.SequenceModel

class SequenceModel(*args, **kwargs)[source]

Bases: Model

A sequence of Model

Parameters:

models (list of Model) – the models in the sequence

_forward(tensordict: TensorDictBase) TensorDictBase[source]

Method to implement for the forward pass of the model. It should read self.in_keys, process it and write self.out_key.

Parameters:

tensordict (TensorDictBase) – the input td

Returns: the input td with the written self.out_key