jaxsnn.event.utils.to_nir

Conversion of a jaxsnn model to a NIR graph

Classes

EventBaseModule(generator, …)

Base class for event-driven network modules.

Population(generator, List[str], Dict[str, …)

Event-driven population module

Projection(generator, int], …)

Event-driven projection module

SourcePopulation(generator, parameters, …)

Event-driven source population module

Topology(t_max, backprop_method, mock, …)

Represents a spiking neural network (SNN) topology as a directed graph of layers.

Functions

jaxsnn.event.utils.to_nir.node_to_nir(module: jaxsnn.event.types.EventBaseModule, params: dict)nir.ir.node.NIRNode

Convert a jaxsnn module to a NIR node.

Parameters
  • module – jaxsnn module to convert.

  • params – Parameters for the module.

Returns

Converted NIR node.

jaxsnn.event.utils.to_nir.to_nir(topology: jaxsnn.event.topology.Topology, params: dict, output: Optional[List[str], None] = None)nir.ir.graph.NIRGraph

Convert a jaxsnn model to a NIRGraph. Note that the output node is not explicitly represented in the jaxsnn topology. Therefore, if an output node is desired in the NIRGraph, it can be specified explicitly via the output argument after which node of the jaxsnn topology the output node should be added.

Parameters
  • topology – jaxsnn topology to convert.

  • params – Parameters for the model.

  • output – Keys of the output nodes in the jaxsnn topology.

Returns

Converted NIRGraph.