从一个指定位置加载 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)
| 50 | return format_graph(graph=ppq_ir) |
| 51 | |
| 52 | def 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 | |
| 66 | def load_native_graph(import_file: str) -> BaseGraph: |
| 67 | """ |
no test coverage detected