Expand (Changing the Original Shape)

Description

Expands dimensions of a shape and uses the result to update the original shape object.

Prototype

ge::graphStatus Expand(Shape &shape) const

Parameters

Parameter

Input/Output

Description

shape

Both input and output

Shape object whose dimensions need to be expanded.

Returns

ge::GRAPH_SUCCESS on success.

For details about the definition of the ge::graphStatus type, see ge::graphStatus.

Restrictions

None

Example

Shape shape({3, 256, 256}); // Set the original shape to 3,256,256.
ExpandDimsType type1("1000");
auto ret = type1.Expand(shape); // ret = ge::GRAPH_SUCCESS, shape = 1,3,256,256