exporter
最后更新
modelconverter.platforms.hailo.exporter将模型导出为 Hailo .hef 格式。驱动 hailo_sdk_client 工具链:模型被转换为 Hailo IR,可选地使用配置的校准图像进行量化,最后为选定的 Hailo 硬件架构进行编译。需要 Hailo Docker 镜像,该镜像提供了 SDK。类
HailoExporter
.hef 二进制文件。校准和编译可以单独禁用,在这种情况下会生成一个中间的 .har 模型。方法
init
Python
1def __init__(config: SingleStageConfig, output_dir: Path):0。参数config(SingleStageConfig): 正在转换的模型配置。output_dir(Path): 导出模型和中间工件的写入目录。
export
Python
1def export(self) -> Path:Path: 编译后的.hef模型的路径。如果禁用了校准,则返回翻译后的.har模型的路径;如果只禁用了编译,则返回量化后的.har模型的副本路径。
exporter_buildinfo
Python
1def exporter_buildinfo(self) -> Params:Params: 包含 Hailo SDK 版本、优化和压缩级别以及用于校准的模型脚本 (alls) 的字典。