FindOpByName
Description
Obtains an operator object registered with a graph based on the operator name.
Prototype
APIs using strings will be deprecated in later versions. Use APIs supporting non-string data instead.
graphStatus FindOpByName(const std::string &name, ge::Operator &op) const; graphStatus FindOpByName(const char_t *name, ge::Operator &op) const;
Parameters
Parameter |
Input/Output |
Description |
|---|---|---|
name |
Input |
Operator name. |
op |
Output |
Operator object. |
Returns
Parameter |
Type |
Description |
|---|---|---|
- |
graphStatus |
SUCCESS: The operator instances are successfully obtained. FAILED: The operator object is not registered in the graph. |
Restrictions
This API is optional and is used in pair with AddOp.
Parent topic: Graph Construction APIs