hxtorch.spiking.modules.hx_module_wrapper.HXModule

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

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

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

__init__(experiment: Experiment, func: Union[Callable, torch.autograd.Function], execution_instance: Optional[ExecutionInstance] = None)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

  • execution_instance – Execution instance to place to.

Methods

__init__(experiment, func[, execution_instance])

param experiment

Experiment to append layer to.

Attributes

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