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

Function load_caffe_graph

ppq/api/interface.py:52–64  ·  view source on GitHub ↗

从一个指定位置加载 caffe 计算图,注意该加载的计算图尚未经过调度,此时所有算子被认为是可量化的 load caffe graph from the specified location Args: prototxt_path (str): caffe prototxt的保存位置 the specified location of caffe prototxt caffemodel_path (str): caffe weight的保存位置 the specified location of caffe weight

(prototxt_path: str, caffemodel_path: str)

Source from the content-addressed store, hash-verified

50 return format_graph(graph=ppq_ir)
51
52def load_caffe_graph(prototxt_path: str, caffemodel_path: str) -> BaseGraph:
53 """
54 从一个指定位置加载 caffe 计算图,注意该加载的计算图尚未经过调度,此时所有算子被认为是可量化的
55 load caffe graph from the specified location
56 Args:
57 prototxt_path (str): caffe prototxt的保存位置 the specified location of caffe prototxt
58 caffemodel_path (str): caffe weight的保存位置 the specified location of caffe weight
59
60 Returns:
61 BaseGraph: 解析 caffe 获得的 ppq 计算图对象 the parsed ppq IR graph
62 """
63 ppq_ir = load_graph(file_path=prototxt_path, caffemodel_path=caffemodel_path, from_framework=NetworkFramework.CAFFE)
64 return format_graph(graph=ppq_ir)
65
66def load_native_graph(import_file: str) -> BaseGraph:
67 """

Callers 1

Calls 2

load_graphFunction · 0.85
format_graphFunction · 0.85

Tested by

no test coverage detected