norse.torch.utils.export_nir.to_nir

Contents

norse.torch.utils.export_nir.to_nir#

norse.torch.utils.export_nir.to_nir(module: Module, sample_data: Tensor | None = None, model_name: str = 'norse', time_scaling_factor: float = 1, type_check: bool = True) NIRNode[source]#

Converts a Norse module to a NIR graph.

Args:

module (torch.nn.Module): Norse module to convert sample_data (torch.Tensor): Sample data to infer input shape. DEPRECATED and will be removed in

future releases.

model_name (str): Name of the model. DEPRECATED and will be removed in future releases time_scaling_factor (float): Integration time step to use when converting neurons. This parameter

defaults to 1 which retains the dynamics of the neuron equation. However, if your network has been trained with a different dt, this scaling factor can re-scale the network dynamics as needed.

type_check (bool): Whether to run type checking on generated NIRGraphs