文档
注册

ConstructFromInputs

函数功能

支持基于用户构造的operator对象生成一个graph对象,功能与SetInputs一致。

SetInputs未来会逐步消亡,统一使用此接口。

函数原型

static GraphPtr ConstructFromInputs(const std::vector<Operator> &inputs, const ge::AscendString &name);

参数说明

参数名

输入/输出

描述

inputs

输入

整图输入的operator。

name

输入

Graph的名字。

返回值

参数名

类型

描述

-

GraphPtr

图指针,返回新构造的图。

调用示例

1
2
3
GraphPtr graph;
graph =  Graph::ConstructFromInputs(inputs, graph_name);
graph->SetOutputs(outputs);
搜索结果
找到“0”个结果

当前产品无相关内容

未找到相关内容,请尝试其他搜索词