提交 02a25407 编写于 作者: M mindspore-ci-bot 提交者: Gitee

!30 use string::find instead of equal to distinguish training graph

Merge pull request !30 from chenhaozhe/enable-variable-acc-for-training-graph
......@@ -1104,7 +1104,7 @@ bool ExecutorPy::AddDFGraph(const py::dict& init_params, const std::string& phas
}
std::string init_graph = "init_subgraph." + net_id;
std::string checkpoint_name = "save." + net_id;
if (phase == "train") {
if (phase.find("train") != std::string::npos) {
(void)DfGraphManager::GetInstance().AddGraph(phase, convertor.GetComputeGraph(), {{"ge.exec.variable_acc", "1"}});
} else {
(void)DfGraphManager::GetInstance().AddGraph(phase, convertor.GetComputeGraph());
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册