---
title: aclgrphParseTensorFlow
description: "| 产品 | 是否支持 |"
url: https://www.hiascend.com/document/detail/zh/canncommercial/latest/API/ascendgraphapi/atlasgeapi_07_0003.html
sourcePath: /source/zh/canncommercial/900/API/ascendgraphapi/atlasgeapi_07_0003.html
indexId: 7feea5096af15fa0a9eeafd35b01925d291ecde8feeade64f866570774b70c6172
---
# aclgrphParseTensorFlow

#### 产品支持情况

| 产品 | 是否支持 |
| --- | --- |
| Atlas 350 加速卡 | √ |
| Atlas A3 训练系列产品 / Atlas A3 推理系列产品 | √ |
| Atlas A2 训练系列产品 / Atlas A2 推理系列产品 | √ |
| Atlas 200I/500 A2 推理产品 | √ |
| Atlas 推理系列产品 | √ |
| Atlas 训练系列产品 | √ |


#### 头文件/库文件

- 头文件：#include <parser/tensorflow_parser.h>
- 库文件：libfmk_parser.so


#### 功能说明

将TensorFlow模型解析为Graph。


#### 函数原型

```
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 | 输出 | 解析后生成的Graph。 |


#### 返回值说明

| 参数名 | 类型 | 说明 |
| --- | --- | --- |
| \- | graphStatus | GRAPH\_SUCCESS(0)：成功。 其他值：失败，详情请参见"ge::graphStatus(https://www.hiascend.comdocument/detail/zh/canncommercial/900/maintenref/basicdataapi/atlasopapi\_07\_00513.html)"。 |


#### 约束说明

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