norse.torch.utils.import_nir.from_nir

Contents

norse.torch.utils.import_nir.from_nir#

norse.torch.utils.import_nir.from_nir(node: ~nir.ir.node.NIRNode, ignore_warnings: bool = False, reset_method: ~typing.Callable[[~torch.Tensor, ~torch.Tensor, ~torch.Tensor, ~torch.Tensor], ~torch.Tensor] = <function reset_value>, dt: float = 0.001) Module[source]#

Converts a NIR graph to a Norse module.

Example: >>> import nir >>> import norse.torch >>> g = nir.read(“my_graph.nir”) >>> module = norse.torch.from_nir(g)

Arguments:

node (nir.NIRNode): The root node of the NIR graph to convert. ignore_warnings (bool): Whether to ignore warnings about diverging or unsupported parameters. dt (float): The time step of the simulation.