hxtorch.spiking.modules.Population

class hxtorch.spiking.modules.Population(size: int, experiment: Experiment, func: Union[Callable, torch.autograd.Function], execution_instance: Optional[ExecutionInstance] = None)

Bases: hxtorch.spiking.modules.hx_module.HXModule

Base class for populations on BSS-2

__init__(size: int, experiment: Experiment, func: Union[Callable, torch.autograd.Function], execution_instance: Optional[ExecutionInstance] = None)None
Parameters
  • size – Number of input neurons.

  • experiment – Experiment to append layer to.

  • execution_instance – Execution instance to place to.

  • func – Callable function implementing the module’s forward functionality or a torch.autograd.Function implementing the module’s forward and backward operation. TODO: Inform about func args

Methods

__init__(size, experiment, func[, …])

param size

Number of input neurons.

extra_repr()

Add additional information

Attributes

extra_repr()str

Add additional information

size: int