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

#### 产品支持情况

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


#### 头文件/库文件

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


#### 功能说明

将Caffe模型解析为图。


#### 函数原型

```
graphStatus aclgrphParseCaffe(const char *model_file, const char *weights_file, ge::Graph &graph)
graphStatus aclgrphParseCaffe(const char *model_file, const char *weights_file, const std::map<ge::AscendString, ge::AscendString> &parser_params, ge::Graph &graph)
```


#### 参数说明

| 参数名 | 输入/输出 | 说明 |
| --- | --- | --- |
| model\_file | 输入 | Caffe原始模型文件路径。 |
| weights\_file | 输入 | Caffe权重文件路径。 |
| parser\_params | 输入 | 配置参数map映射表，key为参数类型，value为参数值，均为AscendString格式，用于描述原始模型解析参数。 map中支持的配置参数请参见Parser解析接口支持的配置参数。 |
| graph | 输出 | 解析后生成的图。 |


#### 返回值说明

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


#### 约束说明

无
