从一个指定位置加载 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)
| 37 | return graph |
| 38 | |
| 39 | def 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 | |
| 52 | def load_caffe_graph(prototxt_path: str, caffemodel_path: str) -> BaseGraph: |
| 53 | """ |
no test coverage detected