hxtorch.spiking.experiment.BaseModuleManager
-
class
hxtorch.spiking.experiment.
BaseModuleManager
Bases:
abc.ABC
Abstract base class for module manager
-
__init__
()
Methods
__init__
()add_node
(module, sources, target)Adds a new module to the manager.
add_wrapper
(wrapper)Adds a new wrapper to the manager.
clear
()Clear the internal graph and remove the module -> node and wrapper -> node mapping
done
()Create a list of elements of form (module, sources, targets), which can be looped in the correct order.
-
abstract
add_node
(module: Union[hxtorch.spiking.modules.hx_module.HXBaseExperimentModule, Any], sources: Tuple[Any], target: Any) Adds a new module to the manager. This method adds a node to the internal graph to represent the module. It assigned edges to this node holding the data in sources, resp. target. :param module: Module to represented in to the graph. :param sources: The sources to the node representing module. :param targets: The targets of the node representing module.
-
abstract
add_wrapper
(wrapper: Union[hxtorch.spiking.modules.hx_module_wrapper.HXModuleWrapper, Any]) Adds a new wrapper to the manager. This must be called after all modules wrapped by this wrapper are represented in the graph. internal graph to represent the module. It assigned edges to this node holding the data in sources, resp. target. :param module: Module to represented in to the graph.
-
clear
() Clear the internal graph and remove the module -> node and wrapper -> node mapping
-
abstract
done
() → List[Tuple[Union[hxtorch.spiking.modules.hx_module.HXBaseExperimentModule, Any], Tuple[Any], Any]] Create a list of elements of form (module, sources, targets), which can be looped in the correct order. :return: Returns the a list of nodes to be executed.
-