从一个指定位置加载 原生计算图,原生计算图中包含了所有量化与调度信息 load native graph from the specified location Args: import_file (str): 计算图的保存位置 the specified location Returns: BaseGraph: 解析获得的 ppq 计算图对象 the parsed ppq IR graph
(import_file: str)
| 64 | return format_graph(graph=ppq_ir) |
| 65 | |
| 66 | def load_native_graph(import_file: str) -> BaseGraph: |
| 67 | """ |
| 68 | 从一个指定位置加载 原生计算图,原生计算图中包含了所有量化与调度信息 |
| 69 | load native graph from the specified location |
| 70 | Args: |
| 71 | import_file (str): 计算图的保存位置 the specified location |
| 72 | |
| 73 | Returns: |
| 74 | BaseGraph: 解析获得的 ppq 计算图对象 the parsed ppq IR graph |
| 75 | """ |
| 76 | return load_graph(import_file, from_framework=NetworkFramework.NATIVE) |
| 77 | |
| 78 | def load_torch_model( |
| 79 | model: torch.nn.Module, onnx_file_name: str = 'MyModel.onnx', |
no test coverage detected