hxtorch.spiking.modules.hx_module.HXFunctionalModule

class hxtorch.spiking.modules.hx_module.HXFunctionalModule(experiment: Experiment, func: Union[Callable, torch.autograd.Function])

Bases: hxtorch.spiking.modules.hx_module.HXTorchFunctionMixin, hxtorch.spiking.modules.hx_module.HXBaseExperimentModule

PyTorch module supplying basic functionality for elements of SNNs that do not have a direct hardware representation

__init__(experiment: Experiment, func: Union[Callable, torch.autograd.Function])None
Parameters
  • experiment – Experiment to append layer 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__(experiment, func)

param experiment

Experiment to append layer to.

Attributes

extra_args: Tuple[Any]
extra_kwargs: Dict[str, Any]
training: bool