Operator Registration APIs
Operator type registration starts with the REG_OP API and ends with the OP_END API. The input, output, and attribute information (INPUT, OUTPUT, and ATTR) to be registered is linked by periods (.). After an operator type is registered, a class named after the operator type is automatically generated.
Instance
REG_OP(FullConnection)
.INPUT(x, TensorType::ALL())
.INPUT(w, TensorType::ALL())
.INPUT(b, TensorType::ALL())
.OUTPUT(y, TensorType::ALL())
.ATTR(num_output, AttrValue::INT{0})
.INFER_SHAPE_AND_TYPE(FullConnectionInfer)
.ATTR_ALL_VERIFY(FullConnectionVerify)
.OP_END()
The operator registration APIs are defined in operator_reg.h. For details about registered operators and their header files, see List of Built-in Operators.
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