Updated on 2022-03-13 GMT+08:00

REG_OP

Function Prototype

REG_OP(x)

Function Description

Registers an operator type. Two constructors corresponding to the operator type are automatically generated.

For example, register an operator type Conv2D by calling the REG_OP(Conv2D) API. Two Conv2D constructors are generated. The operator name needs to be specified for Conv2D(const string& name) for example, Conv2D Unique index. If the operator name is left blank, that is, Conv2D(), the default operator name is used.

class Conv2D : public Operator {
    typedef Conv2D _THIS_TYPE;
public:
    explicit Conv2D(const string& name);
    explicit Conv2D();
}

Parameter Description

Parameter

Input/Output

Type

Description

x

Input

-

Macro parameter, operator type name to be registered

Return Value

None

Exception Handling

None

Restriction

The operator type name must be unique.