rockpool.nn.modules.from_nir
- rockpool.nn.modules.from_nir(source: PathLike | NIRNode) Module[source]
Generate a rockpool model from a NIR representation
- Parameters:
source (Union[PathLike, nir.NIRNode]) – Either a filename containing a NIR graph (produced with
nir.write()), or an already-loaded NIR graph (e.g. loaded withnir.read())- Returns:
A
torch-compatible Rockpool module converted fromsource- Return type:
torch.nn.Module