aclgrphParseCaffe

Applicable Products

  • Ascend 950PR / Ascend 950DT : not supported
  • Atlas A3 training products / Atlas A3 inference products : not supported
  • Atlas A2 training products / Atlas A2 inference products : not supported
  • Atlas 200I/500 A2 inference products : supported
  • Atlas inference products : supported
  • Atlas training products : supported

Header File/Library File

  • Header file: #include <parser/caffe_parser.h>
  • Library file: libfmk_parser.so

Function Usage

Parses a Caffe model into a graph.

Prototype

1
2
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)

Parameters

Parameter

Input/Output

Description

model_file

Input

Path of the original Caffe model.

weights_file

Input

Path of the Caffe weight file.

parser_params

Input

A key-value mapping table of type AscendString, for describing the parsing parameters of the original model.

For details, see Configuration Parameters of Model Parsing APIs.

graph

Output

Parsed graph.

Returns

Parameter

Type

Description

-

graphStatus

GRAPH_SUCCESS(0): success.

Other values: failure. For details, see ge::graphStatus.

Restrictions

None