modeci_mdf.interfaces.pytorch.exporter.get_module_declaration_text(name: str, node_dict: Dict[Any, Any], execution_order: List[str], version: str)[source]

Helper function to generate string in String will create an instance of the torch object corresponding to the node and function at node as method Generated text specifies the definition of class that will form the pytorch model, including __init__method and forward method. Returns string of the class definition with parameters and arguments assigned.

  • name – Name of the node

  • node_dict – dictionary with attributes of the node such as Input Ports, functions, parameters and

  • execution_order – List of nodes in the order of execution

Returns: Script in PyTorch schema