InferShapeAndTypeFn
Function
Shape inference function
Syntax
OpRegistrationData& InferShapeAndTypeFn(InferShapeFunc inferShapeFn);
Parameter Description
Parameter |
Input/Output |
Description |
---|---|---|
inferShapeFn |
Input |
Callback function InferShapeFunc. For details, see Callback Function InferShapeFunc. |
Callback Function InferShapeFunc
You can customize and implement the InferShapeFunc class function to obtain the output description of an operator, including the tensor description such as the output shape information and data type.
Syntax
Status InferShapeFunc(const ge::Operator& op, vector<ge::TensorDesc>& v_output_desc);
Parameter Description
Parameter |
Input/Output |
Description |
---|---|---|
op |
Input |
Operator data structure of offline model supported by the Ascend AI processor For details about the operator class, see Operator Class APIs in GE API Reference. |
v_output_desc |
Output |
Operator output description For details about the TensorDesc class, see TensorDesc Class APIs in GE API Reference. |
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot