InferShape

Applicability

Product

Supported or Not

Atlas A3 training products/Atlas A3 inference products

Atlas A2 training products/Atlas A2 inference products

Atlas 200I/500 A2 inference products

Atlas inference products

Atlas training products

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.

Constraints

None