InferShape

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 <ge/ge_utils.h>
  • Library file: libge_compiler.so

Function Usage

Performs shape inference on the input graph based on the input shape.

This API is used only for shape inference. It does not perform any other optimizations (such as constant folding and dead-edge elimination) on the graph.

Prototype

1
static Status InferShape(const Graph &graph, const std::vector<Shape> &input_shape)

Parameters

Parameter

Input/Output

Description

graph

Input

Graph to be inferred.

input_shape

Input

Graph input shape.

Returns

Parameter

Type

Description

-

graphStatus

SUCCESS: Inference succeeded.

FAILED: Inference failed.

Restrictions

None