昇腾社区首页
中文
注册

aclgrphParseTensorFlow

产品支持情况

产品

是否支持

Atlas A2 训练系列产品/Atlas 800I A2 推理产品

Atlas 200I/500 A2 推理产品

Atlas 推理系列产品

Atlas 训练系列产品

Atlas 200/300/500 推理产品

功能说明

将TensorFlow模型解析为图。

函数原型

1
2
graphStatus aclgrphParseTensorFlow(const char *model_file, ge::Graph &graph)
graphStatus aclgrphParseTensorFlow(const char *model_file, const std::map<ge::AscendString, ge::AscendString> &parser_params, ge::Graph &graph)

参数说明

参数名

输入/输出

说明

model_file

输入

TensorFlow原始模型文件路径。

parser_params

输入

配置参数map映射表,key为参数类型,value为参数值,均为AscendString格式,用于描述原始模型解析参数。

map中支持的配置参数请参见Parser解析接口支持的配置参数

graph

输出

解析后生成的图。

返回值说明

参数名

类型

说明

-

graphStatus

0:成功。

其他值:失败。

约束说明

使用该接口解析的Graph,graph name中会包含时间戳,因此多次调用该接口,graph name会不同。