aclgrphParseTensorFlow

Applicability

Product

Supported

Atlas 350 Accelerator Card

Atlas A3 training product / Atlas A3 inference product

Atlas A2 training product / Atlas A2 inference product

Atlas 200I/500 A2 inference product

Atlas inference product

Atlas training product

Header File/Library File

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

Function Usage

Parses a TensorFlow model into a graph.

Prototype

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)

Parameters

Parameter

Input/Output

Description

model_file

Input

Path of the original TensorFlow model.

parser_params

Input

A key-value mapping table of type AscendString, for describing the parsing parameters of 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

When this API is called, the graph name contains the timestamp. When it is called multiple times, different graph names are produced.