SetInferShape

Function

Registers the Shape inference function. This API is required when the graph mode is used.

Prototype

1
OpDef &SetInferShape(gert::OpImplRegisterV2::InferShapeKernelFunc func)

Parameters

Parameter

Input/Output

Description

func

Input

Shape inference function. The InferShapeKernelFunc type is defined as follows. For details about the input parameter type, see InferShapeContext.

1
using InferShapeKernelFunc = UINT32 (*)(InferShapeContext *);

Returns

OpDef operator definition. For details, see OpDef.

Constraints

None