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

Function load_native_graph

ppq/api/interface.py:66–76  ·  view source on GitHub ↗

从一个指定位置加载 原生计算图,原生计算图中包含了所有量化与调度信息 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)

Source from the content-addressed store, hash-verified

64 return format_graph(graph=ppq_ir)
65
66def 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
78def load_torch_model(
79 model: torch.nn.Module, onnx_file_name: str = 'MyModel.onnx',

Callers 2

myquantizer.pyFile · 0.90
imagenet.pyFile · 0.90

Calls 1

load_graphFunction · 0.85

Tested by

no test coverage detected