DYNAMIC_OUTPUT
Function Prototype
DYNAMIC_OUTPUT (x, t)
Function Description
Registers the dynamic output information of an operator.
After the dynamic output information is successfully registered, APIs (for creating dynamic output and setting the output description) are generated automatically.
For example, if the dynamic output is d and the data type supported by the operator output is TensorType{DT_FLOAT}, call the DYNAMIC_OUTPUT (d, TensorType{DT_FLOAT}) API. After the dynamic output is successfully registered, the following APIs are automatically generated:
_THIS_TYPE& create_dynamic_output_d(unsigned int num); // Creates dynamic output d, including a number of num inputs. TensorDesc get_dynamic_output_desc_d(unsigned int index);// Returns description indexth of dynamic output d, including Shape, DataType, and Format. graphStatus update_dynamic_output_desc_d(unsigned int index, const TensorDesc& tensorDesc);// Updates description indexth of dynamic output d.
Parameter Description
Parameter |
Input/Output |
Type |
Description |
---|---|---|---|
x |
Input |
- |
Macro parameter, output name of the operator |
t |
Input |
- |
Data type supported by the operator output. One or more data types defined by TensorType are supported. Separate data types with commas (,). For example: TensorType{DT_FLOAT} TensorType({DT_FLOAT, DT_INT8} |
Return Value
None
Exception Handling
None
Restriction
For an operator, the registered output name must be unique.
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