Horde

class Horde(demons: List[pandemonium.demons.demon.Demon], device: torch.device, aggregation_fn: Callable[[torch.Tensor], torch.Tensor] = None, to_transitions: bool = False)

Bases: torch.nn.modules.module.Module

A horde of Demons

Container class for all the demons of a particular agent.

Auto-registers parameters of all the demons through ModuleDict container.

Note

calling state_dict() will return duplicate parameters, i.e. a convnet shared across demons can appear multiple times, which increases memory overhead. however, named_parameters() handles the duplicates somehow!

Methods Summary

learn(self, transitions)

Methods Documentation

learn(self, transitions) → dict