.. _f-xop: module ``npy.xop`` ================== .. inheritance-diagram:: mlprodict.npy.xop Short summary +++++++++++++ module ``mlprodict.npy.xop`` Xop API to build onnx graphs. Inspired from :epkg:`sklearn-onnx`. Classes +++++++ +------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------+ | class | truncated documentation | +========================================================================+===============================================================================================================================+ | :class:`_CustomSchema ` | For operators defined outside onnx. | +------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------+ | :class:`_GraphBuilder ` | Graph builder. It takes a graph structure made with instances of :class:`OnnxOperatorBase`. The main method is `to_onnx`. ... | +------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------+ | :class:`_StaticVariables ` | Holds static variables. | +------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------+ | :class:`_WrapperLogger ` | Wrappers around class :class:`logging.Logger` to take indentation into account. | +------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------+ | :class:`_WrapperPrint ` | Wrappers around print to help debugging. | +------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------+ | :class:`OnnxExisting ` | Wrapper around OnnxIdentity to specify this operator is not part of the subgraph it is used in. | +------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------+ | :class:`OnnxLoadFactory ` | Automatically creating all operators from onnx packages takes time. That's why function :class:`loadop` only creates ... | +------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------+ | :class:`OnnxOperator ` | Ancestor to every *ONNX* operator exposed in :mod:`mlprodict.npy.xops` and :mod:`mlprodict.npy.xops_ml`. | +------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------+ | :class:`OnnxOperatorBase ` | Base class for :class:`OnnxOperator`, :class:`OnnxOperator`Item, :class:`OnnxOperatorTuple`. | +------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------+ | :class:`OnnxOperatorFunction ` | This operator is used to insert existing ONNX function into the ONNX graph being built. | +------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------+ | :class:`OnnxOperatorItem ` | Accessor to one of the output returned by a :class:`OnnxOperator`. | +------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------+ | :class:`OnnxOperatorTuple ` | Class used to return multiple :class:`OnnxVar` at the same time. | +------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------+ Functions +++++++++ +---------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | function | truncated documentation | +=======================================================================================+================================================================================================================================================================================+ | :func:`_default_OPSET_TO_IR_VERSION ` | Returns the default mapping between opset and ir_version. | +---------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :func:`_domain_to_class_name ` | Converts domain into a name. | +---------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :func:`_dynamic_class_creation ` | Automatically generates classes for each of the operators module *onnx* defines and described at `Operators `_ ... | +---------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :func:`_find_operator_domain ` | Determines the domain of an operator. Raises an exception if not found or if there is an ambiguity. | +---------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :func:`_get_all_operator_schema ` | | +---------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :func:`_populate_schemas ` | Populates all schemas. | +---------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :func:`_split_op_name ` | | +---------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :func:`ClassFactory ` | Dynamically creates a class for a specific operator. | +---------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :func:`loadop ` | Dynamically creates a class for a every operator type in the given list. | +---------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ Properties ++++++++++ +----------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------+ | property | truncated documentation | +========================================================================================+================================================================================================================+ | :meth:`all_classes ` | Returns all operators wrapped in classes. | +----------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------+ | :meth:`all_domains ` | Returns all domains. | +----------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------+ | :meth:`all_schemas ` | Returns all schemas. | +----------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------+ | :meth:`all_schemas_versions ` | Returns all operators, domains, versions. | +----------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------+ | :meth:`external_inputs ` | Returns the list of implicit inputs the subgraph assumes to be existing even if they are not referenced as ... | +----------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------+ | :meth:`inputs ` | Returns the only inputs in a list. | +----------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------+ | :meth:`inputs ` | Returns the only inputs in a list. | +----------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------+ | :meth:`output_names ` | Returns `self.output_names_`. | +----------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------+ | :meth:`output_names ` | Returns `self.output_names_`. | +----------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------+ | :meth:`output_names ` | This method should be overwritten. | +----------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------+ | :meth:`output_names ` | Returns `self.output_names_`. | +----------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------+ | :meth:`output_names ` | Returns None. | +----------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------+ | :meth:`output_names ` | Returns 'output_names' of attribute 'unique'. | +----------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------+ | :meth:`outputs ` | Returns 'output_names' of attribute 'unique'. | +----------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------+ Static Methods ++++++++++++++ +-------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------+ | staticmethod | truncated documentation | +===================================================================================================================+=====================================================================================================================+ | :py:meth:`__class_getitem__ ` | Enables expression `cls[opset]`. It returns the appropriate class `cls_opset`. Parameter *op_version* should be ... | +-------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------+ | :py:meth:`__class_getitem__ ` | Enables expression `cls[opset]`. It returns the appropriate class `cls_opset`. Parameter *op_version* should be ... | +-------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------+ | :py:meth:`__class_getitem__ ` | Enables expression `cls[opset]`. It returns the appropriate class `cls_opset`. Parameter *op_version* should be ... | +-------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------+ | :py:meth:`_merge_op_version ` | | +-------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------+ | :py:meth:`_merge_op_version ` | | +-------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------+ | :py:meth:`_merge_op_version ` | | +-------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------+ | :py:meth:`_node_to_graph_get_type ` | | +-------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------+ | :py:meth:`_node_to_graph_get_type ` | | +-------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------+ | :py:meth:`_node_to_graph_get_type ` | | +-------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------+ | :py:meth:`_node_to_graph_preprocess_list ` | | +-------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------+ | :py:meth:`_node_to_graph_preprocess_list ` | | +-------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------+ | :py:meth:`_node_to_graph_preprocess_list ` | | +-------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------+ | :py:meth:`_node_to_graph_process_input ` | | +-------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------+ | :py:meth:`_node_to_graph_process_input ` | | +-------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------+ | :py:meth:`_node_to_graph_process_input ` | | +-------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------+ | :py:meth:`_node_to_graph_reorder_by_name ` | | +-------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------+ | :py:meth:`_node_to_graph_reorder_by_name ` | | +-------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------+ | :py:meth:`_node_to_graph_reorder_by_name ` | | +-------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------+ | :meth:`attribute_to_value ` | Converts an attribute into a value using python structures. | +-------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------+ | :meth:`get_unique_name ` | Returns a unique variable name. | +-------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------+ | :meth:`number2alpha ` | Converts a numbers into a string keeping the same alphabetical order. | +-------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------+ | :meth:`ParseFromString ` | Parses this class from a json string. | +-------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------+ Methods +++++++ +-------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ | method | truncated documentation | +=======================================================================================================+=======================================================================================================================================================+ | :py:meth:`__abs__ ` | Automatically adds operator `OnnxAbs` to the graph. | +-------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ | :py:meth:`__abs__ ` | Automatically adds operator `OnnxAbs` to the graph. | +-------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ | :py:meth:`__abs__ ` | Automatically adds operator `OnnxAbs` to the graph. | +-------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ | :py:meth:`__add__ ` | Automatically adds operator `OnnxAdd` to the graph. | +-------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ | :py:meth:`__add__ ` | Automatically adds operator `OnnxAdd` to the graph. | +-------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ | :py:meth:`__add__ ` | Automatically adds operator `OnnxAdd` to the graph. | +-------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ | :py:meth:`__call__ ` | Creates an instance of class :class:`OnnxOperatorFunction`. Equivalent to `OnnxOperatorFunction(proto, *args, **kwargs)`. ... | +-------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ | :py:meth:`__call__ ` | Creates an instance of class :class:`OnnxOperatorFunction`. Equivalent to `OnnxOperatorFunction(proto, *args, **kwargs)`. ... | +-------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ | :py:meth:`__call__ ` | Creates an instance of class :class:`OnnxOperatorFunction`. Equivalent to `OnnxOperatorFunction(proto, *args, **kwargs)`. ... | +-------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ | :py:meth:`__eq__ ` | Automatically adds operator `OnnxEqual` to the graph. | +-------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ | :py:meth:`__eq__ ` | Automatically adds operator `OnnxEqual` to the graph. | +-------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ | :py:meth:`__eq__ ` | Automatically adds operator `OnnxEqual` to the graph. | +-------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ | :py:meth:`__eq__ ` | | +-------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ | :py:meth:`__ge__ ` | Automatically adds operator `OnnxGreaterOrEqual` to the graph. | +-------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ | :py:meth:`__ge__ ` | Automatically adds operator `OnnxGreaterOrEqual` to the graph. | +-------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ | :py:meth:`__ge__ ` | Automatically adds operator `OnnxGreaterOrEqual` to the graph. | +-------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ | :py:meth:`__getattr__ ` | Enables expressions such as: | +-------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ | :py:meth:`__getitem__ ` | Returns an accessor to one of the output of this node. | +-------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ | :py:meth:`__getitem__ ` | Returns an accessor to one of the output of this node. | +-------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ | :py:meth:`__getitem__ ` | Returns an accessor to one of the output of this node. | +-------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ | :py:meth:`__getitem__ ` | usual | +-------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ | :py:meth:`__gt__ ` | Automatically adds operator `OnnxGreater` to the graph. | +-------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ | :py:meth:`__gt__ ` | Automatically adds operator `OnnxGreater` to the graph. | +-------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ | :py:meth:`__gt__ ` | Automatically adds operator `OnnxGreater` to the graph. | +-------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ | :py:meth:`__init__ ` | | +-------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ | :py:meth:`__init__ ` | | +-------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ | :py:meth:`__init__ ` | | +-------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ | :py:meth:`__init__ ` | | +-------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ | :py:meth:`__init__ ` | | +-------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ | :py:meth:`__init__ ` | | +-------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ | :py:meth:`__init__ ` | | +-------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ | :py:meth:`__init__ ` | | +-------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ | :py:meth:`__init__ ` | | +-------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ | :py:meth:`__init__ ` | | +-------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ | :py:meth:`__init__ ` | constructor | +-------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ | :py:meth:`__init__ ` | constructor | +-------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ | :py:meth:`__iter__ ` | Allows expressions such as ``a, b = OnnxTopK(...)``. | +-------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ | :py:meth:`__iter__ ` | Allows expressions such as ``a, b = OnnxTopK(...)``. | +-------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ | :py:meth:`__iter__ ` | Allows expressions such as ``a, b = OnnxTopK(...)``. | +-------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ | :py:meth:`__iter__ ` | Iterates on the outputs. | +-------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ | :py:meth:`__le__ ` | Automatically adds operator `OnnxLess` to the graph. | +-------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ | :py:meth:`__le__ ` | Automatically adds operator `OnnxLess` to the graph. | +-------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ | :py:meth:`__le__ ` | Automatically adds operator `OnnxLess` to the graph. | +-------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ | :py:meth:`__len__ ` | usual | +-------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ | :py:meth:`__lt__ ` | Automatically adds operator `OnnxLess` to the graph. | +-------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ | :py:meth:`__lt__ ` | Automatically adds operator `OnnxLess` to the graph. | +-------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ | :py:meth:`__lt__ ` | Automatically adds operator `OnnxLess` to the graph. | +-------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ | :py:meth:`__matmul__ ` | Automatically adds operator `OnnxMatMul` to the graph. | +-------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ | :py:meth:`__matmul__ ` | Automatically adds operator `OnnxMatMul` to the graph. | +-------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ | :py:meth:`__matmul__ ` | Automatically adds operator `OnnxMatMul` to the graph. | +-------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ | :py:meth:`__mod__ ` | Automatically adds operator `OnnxMod` to the graph. | +-------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ | :py:meth:`__mod__ ` | Automatically adds operator `OnnxMod` to the graph. | +-------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ | :py:meth:`__mod__ ` | Automatically adds operator `OnnxMod` to the graph. | +-------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ | :py:meth:`__mul__ ` | Automatically adds operator `OnnxMul` to the graph. | +-------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ | :py:meth:`__mul__ ` | Automatically adds operator `OnnxMul` to the graph. | +-------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ | :py:meth:`__mul__ ` | Automatically adds operator `OnnxMul` to the graph. | +-------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ | :py:meth:`__ne__ ` | Automatically adds operator `OnnxNot x OnnxEqual` to the graph. | +-------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ | :py:meth:`__ne__ ` | Automatically adds operator `OnnxNot x OnnxEqual` to the graph. | +-------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ | :py:meth:`__ne__ ` | Automatically adds operator `OnnxNot x OnnxEqual` to the graph. | +-------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ | :py:meth:`__pow__ ` | Automatically adds operator `OnnxPow` to the graph. | +-------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ | :py:meth:`__pow__ ` | Automatically adds operator `OnnxPow` to the graph. | +-------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ | :py:meth:`__pow__ ` | Automatically adds operator `OnnxPow` to the graph. | +-------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ | :py:meth:`__repr__ ` | usual | +-------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ | :py:meth:`__repr__ ` | usual | +-------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ | :py:meth:`__repr__ ` | usual | +-------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ | :py:meth:`__repr__ ` | usual | +-------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ | :py:meth:`__repr__ ` | usual | +-------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ | :py:meth:`__repr__ ` | | +-------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ | :py:meth:`__str__ ` | usual | +-------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ | :py:meth:`__sub__ ` | Automatically adds operator `OnnxSub` to the graph. | +-------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ | :py:meth:`__sub__ ` | Automatically adds operator `OnnxSub` to the graph. | +-------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ | :py:meth:`__sub__ ` | Automatically adds operator `OnnxSub` to the graph. | +-------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ | :py:meth:`__truediv__ ` | Automatically adds operator `OnnxDiv` to the graph. | +-------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ | :py:meth:`__truediv__ ` | Automatically adds operator `OnnxDiv` to the graph. | +-------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ | :py:meth:`__truediv__ ` | Automatically adds operator `OnnxDiv` to the graph. | +-------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ | :py:meth:`_add_domain ` | | +-------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ | :py:meth:`_add_name ` | | +-------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ | :py:meth:`_add_subgraph ` | Fills attribute *attribute*. | +-------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ | :py:meth:`_add_subgraph ` | Fills attribute *attribute*. | +-------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ | :py:meth:`_add_subgraph ` | Fills attribute *attribute*. | +-------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ | :py:meth:`_check ` | | +-------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ | :py:meth:`_check ` | | +-------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ | :py:meth:`_check ` | | +-------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ | :py:meth:`_node_to_graph ` | Builds a graph as a list of nodes to walk through in that order. | +-------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ | :py:meth:`_node_to_graph ` | Builds a graph as a list of nodes to walk through in that order. | +-------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ | :py:meth:`_node_to_graph ` | Builds a graph as a list of nodes to walk through in that order. | +-------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ | :py:meth:`_post_process_attributes ` | Walks through attributes and replaces them by ONNX values. | +-------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ | :py:meth:`_post_process_attributes ` | Walks through attributes and replaces them by ONNX values. | +-------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ | :py:meth:`_post_process_attributes ` | Walks through attributes and replaces them by ONNX values. | +-------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ | :py:meth:`_process_io ` | | +-------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ | :py:meth:`_set_control_op ` | | +-------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ | :py:meth:`_set_control_op ` | Sets *control_op* for every instance of :class:`OnnxExisting` node. | +-------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ | :py:meth:`_set_control_op ` | Tells this operator is part of a subgraph. | +-------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ | :py:meth:`_set_control_op ` | Sets *control_op* for every instance of :class:`OnnxExisting` node. | +-------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ | :py:meth:`_set_control_op ` | Tells this operator is part of a subgraph. | +-------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ | :py:meth:`_set_control_op ` | Tells this operator is part of a subgraph. | +-------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ | :py:meth:`_to_onnx_attribute ` | Converts one subgraph into ONNX. Returns the ONNX graph and the hidden inputs. | +-------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ | :py:meth:`_to_onnx_attribute ` | Converts one subgraph into ONNX. Returns the ONNX graph and the hidden inputs. | +-------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ | :py:meth:`_to_onnx_attribute ` | Converts one subgraph into ONNX. Returns the ONNX graph and the hidden inputs. | +-------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ | :py:meth:`_to_onnx_attributes ` | Converts attributes into ONNX. Returns the hidden inputs. | +-------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ | :py:meth:`_to_onnx_attributes ` | Converts attributes into ONNX. Returns the hidden inputs. | +-------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ | :py:meth:`_to_onnx_attributes ` | Converts attributes into ONNX. Returns the hidden inputs. | +-------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ | :py:meth:`_to_onnx_attributes ` | Calls `self.onx_op._to_onnx_attributes`. | +-------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ | :py:meth:`_to_onnx_attributes ` | Calls `self.onx_op._to_onnx_attributes`. | +-------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ | :meth:`add_external_input ` | Tells a subgraph this node comes from a graph calling this one. | +-------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ | :meth:`add_external_input ` | Tells a subgraph this node comes from a graph calling this one. | +-------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ | :meth:`add_external_input ` | Tells a subgraph this node comes from the main graph. It may be used only by the subgraph but it must be processed ... | +-------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ | :meth:`add_external_input ` | Tells a subgraph this node comes from a graph calling this one. | +-------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ | :meth:`add_external_input ` | Tells a subgraph this node comes from the main graph. It may be used only by the subgraph but it must be processed ... | +-------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ | :meth:`add_external_input ` | Tells a subgraph this node comes from the main graph. It may be used only by the subgraph but it must be processed ... | +-------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ | :meth:`add_function ` | Adds a function to the graph. | +-------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ | :meth:`add_initializer ` | Adds an initializer to the graph. | +-------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ | :meth:`add_node ` | Adds a node to the graph. | +-------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ | :meth:`add_to ` | Adds to graph builder. | +-------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ | :meth:`add_to ` | Adds to graph builder. | +-------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ | :meth:`add_to ` | This method should be overwritten. | +-------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ | :meth:`add_to ` | Adds to graph builder. | +-------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ | :meth:`add_to ` | Adds to graph builder. Does nothing because the original node is already added. | +-------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ | :meth:`add_to ` | Adds to graph builder. Does nothing because the original node is already added. | +-------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ | :meth:`and_ ` | Automatically adds operator `OnnxAnd` to the graph. | +-------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ | :meth:`and_ ` | Automatically adds operator `OnnxAnd` to the graph. | +-------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ | :meth:`and_ ` | Automatically adds operator `OnnxAnd` to the graph. | +-------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ | :meth:`astype ` | Automatically adds operator `OnnxCast` to the graph. | +-------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ | :meth:`astype ` | Automatically adds operator `OnnxCast` to the graph. | +-------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ | :meth:`astype ` | Automatically adds operator `OnnxCast` to the graph. | +-------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ | :meth:`data ` | Returns all data in that class in a dictionary. | +-------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ | :meth:`debug ` | debug | +-------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ | :meth:`debug ` | debug | +-------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ | :meth:`debug ` | debug | +-------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ | :meth:`dedent ` | unindent | +-------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ | :meth:`dedent ` | unindent | +-------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ | :meth:`do ` | Fills attribute *body*. | +-------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ | :meth:`do ` | Fills attribute *body*. | +-------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ | :meth:`do ` | Fills attribute *body*. | +-------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ | :meth:`else_do ` | Fills attribute *else_branch*. | +-------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ | :meth:`else_do ` | Fills attribute *else_branch*. | +-------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ | :meth:`else_do ` | Fills attribute *else_branch*. | +-------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ | :meth:`f ` | For the eager mode. | +-------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ | :meth:`f ` | Computes the predictions for this node. Similar to an eager evaluation. | +-------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ | :meth:`f ` | Evaluates this node. | +-------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ | :meth:`f ` | Computes the predictions for this node. Similar to an eager evaluation. | +-------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ | :meth:`f ` | Computes the predictions for this node. Similar to an eager evaluation. | +-------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ | :meth:`f ` | Evaluates this node. | +-------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ | :meth:`find_named_inputs ` | Retrieves all named inputs in this graph. | +-------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ | :meth:`find_named_inputs ` | Retrieves all named inputs in this graph. | +-------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ | :meth:`find_named_inputs ` | Returns all inputs to the graph. | +-------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ | :meth:`find_named_inputs ` | Retrieves all named inputs in this graph. | +-------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ | :meth:`find_named_inputs ` | Returns all inputs to the graph. | +-------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ | :meth:`find_named_inputs ` | Returns all inputs to the graph. | +-------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ | :meth:`find_schema ` | Checks if there is an existing schema for a specific version. | +-------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ | :meth:`find_schema ` | Checks if there is an existing schema for a specific version. | +-------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ | :meth:`find_schema ` | Checks if there is an existing schema for a specific version. | +-------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ | :meth:`get_input_names ` | Returns input names for node *node* and inputs *inputs*. | +-------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ | :meth:`get_output_result ` | Returns the output name at position *i*. | +-------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ | :meth:`get_output_result ` | Returns the output name at position *i*. | +-------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ | :meth:`get_output_result ` | Returns the output name at position *i*. | +-------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ | :meth:`get_output_result ` | Returns the output name at position *i*. | +-------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ | :meth:`get_unique_name ` | Returns a unique name to name an output. | +-------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ | :meth:`get_unique_output_name ` | Returns a unique output_name for a NodeResultName. | +-------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ | :meth:`indent ` | indent | +-------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ | :meth:`indent ` | indent | +-------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ | :meth:`not_ ` | Automatically adds operator `OnnxNot` to the graph. | +-------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ | :meth:`not_ ` | Automatically adds operator `OnnxNot` to the graph. | +-------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ | :meth:`not_ ` | Automatically adds operator `OnnxNot` to the graph. | +-------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ | :meth:`or_ ` | Automatically adds operator `OnnxOr` to the graph. | +-------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ | :meth:`or_ ` | Automatically adds operator `OnnxOr` to the graph. | +-------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ | :meth:`or_ ` | Automatically adds operator `OnnxOr` to the graph. | +-------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ | :meth:`populate ` | Populates static variables. | +-------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ | :meth:`predecessors ` | Returns the list of predecessors. | +-------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ | :meth:`predecessors ` | Returns the list of predecessors. | +-------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ | :meth:`predecessors ` | Returns the list of predecessors. | +-------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ | :meth:`reserve_name ` | Reserves a name so that it cannot be changed. | +-------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ | :meth:`reserve_names ` | Adds names to the list of reserved names. All must be unique. | +-------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ | :meth:`run ` | Other name for `OnnxInference.f `_. | +-------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ | :meth:`run ` | Other name for `OnnxInference.f `_. | +-------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ | :meth:`run ` | Other name for `OnnxInference.f `_. | +-------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ | :meth:`SerializeToString ` | Serializes this class into json. | +-------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ | :meth:`then_do ` | Fills attribute *then_branch*. | +-------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ | :meth:`then_do ` | Fills attribute *then_branch*. | +-------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ | :meth:`then_do ` | Fills attribute *then_branch*. | +-------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ | :meth:`to_onnx ` | Converts this operator into an ONNX graph. | +-------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ | :meth:`to_onnx ` | Converts this operator into an ONNX graph. | +-------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ | :meth:`to_onnx ` | Converts this operator into an ONNX graph. | +-------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ | :meth:`to_onnx ` | Converts this operator into an ONNX graph. It follows the same signature as :meth:`OnnxOperator.to_onnx ` ... | +-------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ | :meth:`to_onnx ` | Converts this operator into an ONNX graph. | +-------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ | :meth:`to_onnx_this ` | Returns a simple ONNX graph corresponding to this node. | +-------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ | :meth:`to_onnx_this ` | Returns a simple ONNX graph corresponding to this node. | +-------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ | :meth:`to_onnx_this ` | Returns a simple ONNX graph corresponding to this node. | +-------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ | :meth:`update_max_item ` | Some operators return a undefined number of outputs. The method is called when require one of them (with `__getitem__`) ... | +-------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ | :meth:`update_max_item ` | Some operators return a undefined number of outputs. The method is called when require one of them (with `__getitem__`) ... | +-------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ | :meth:`update_max_item ` | Some operators return a undefined number of outputs. The method is called when require one of them (with `__getitem__`) ... | +-------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ Documentation +++++++++++++ .. automodule:: mlprodict.npy.xop :members: :special-members: __init__ :show-inheritance: