modeci_mdf.interfaces.pytorch.importer.torchnode_to_mdfnode(node: Node, graph: Graph, consts: Dict[str, Any], port_mapper: PortMapper) Optional[Node][source]

Convert a TorchScript node to an MDF node.

  • node – The node to convert.

  • graph – The graph that this node is a member.

  • consts – A dict containing any constants in the graph.


The MDF node for this TorchScript node. prim::Constant nodes are excluded from the MDF graph and are instead placed as parameters. In this case, return None.