quark.onnx.graph_transformations.model_transformer#

Module Contents#

Classes#

class quark.onnx.graph_transformations.model_transformer.ModelTransformer(model: onnx.ModelProto, transforms: List[Any], candidate_nodes: Optional[Dict[str, Any]] = None, node_metadata: Optional[Dict[str, Any]] = None)#

Matches patterns to apply transforms in a tf.keras model graph.

class NodeType#

Generic enumeration.

Derive from this class to define new enumerations.

transform() Tuple[onnx.ModelProto, Dict[str, Any]]#

Transforms the Onnx model by applying all the specified transforms.

This is the main entry point function used to apply the transformations to the Onnx model.

Not suitable for multi-threaded use. Creates and manipulates internal state.

Returns:

(Onnx model after transformation, Updated node metadata map)