基于算子名称,获取缓存在Graph中的op对象。
数据类型为string的接口后续版本会废弃,建议使用数据类型为非string的接口。
graphStatus FindOpByName(const string& name, ge::Operator& op) const;
graphStatus FindOpByName(const char *name, ge::Operator &op) const;
参数名 |
输入/输出 |
描述 |
---|---|---|
name |
输入 |
需要获取的算子名称。 |
op |
输出 |
返回用户所需要的op对象。 |
参数名 |
类型 |
描述 |
---|---|---|
- |
graphStatus |
SUCCESS: 成功获取算子实例。 FAILED:此名字没有在Graph中注册op对象。 |
此接口为非必须接口,与AddOp搭配使用。