MCPcopy
hub / github.com/OpenPPL/ppq / load_onnx_graph

Function load_onnx_graph

ppq/api/interface.py:39–50  ·  view source on GitHub ↗

从一个指定位置加载 onnx 计算图,注意该加载的计算图尚未经过调度,此时所有算子被认为是可量化的 load onnx graph from the specified location Args: onnx_import_file (str): onnx 计算图的保存位置 the specified location Returns: BaseGraph: 解析 onnx 获得的 ppq 计算图对象 the parsed ppq IR graph

(onnx_import_file: str)

Source from the content-addressed store, hash-verified

37 return graph
38
39def load_onnx_graph(onnx_import_file: str) -> BaseGraph:
40 """
41 从一个指定位置加载 onnx 计算图,注意该加载的计算图尚未经过调度,此时所有算子被认为是可量化的
42 load onnx graph from the specified location
43 Args:
44 onnx_import_file (str): onnx 计算图的保存位置 the specified location
45
46 Returns:
47 BaseGraph: 解析 onnx 获得的 ppq 计算图对象 the parsed ppq IR graph
48 """
49 ppq_ir = load_graph(onnx_import_file, from_framework=NetworkFramework.ONNX)
50 return format_graph(graph=ppq_ir)
51
52def load_caffe_graph(prototxt_path: str, caffemodel_path: str) -> BaseGraph:
53 """

Callers 15

yolo6_sample.pyFile · 0.90
bert_sample.pyFile · 0.90
QuantZoo_Yolo.pyFile · 0.90
QuantZoo_OCR.pyFile · 0.90
yolo_5.pyFile · 0.90
calibration.pyFile · 0.90
quantize.pyFile · 0.90
dynamic_shape.pyFile · 0.85

Calls 2

load_graphFunction · 0.85
format_graphFunction · 0.85

Tested by

no test coverage detected