From 51e1d6096b0163ee4e620b2d7abbd33b9600c0fe Mon Sep 17 00:00:00 2001 From: chujinjin Date: Mon, 14 Sep 2020 16:50:45 +0800 Subject: [PATCH] fix deeplabv3 error in pynative --- mindspore/ccsrc/pipeline/pynative/pynative_execute.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mindspore/ccsrc/pipeline/pynative/pynative_execute.cc b/mindspore/ccsrc/pipeline/pynative/pynative_execute.cc index 09b2b2b662..230e449e4e 100644 --- a/mindspore/ccsrc/pipeline/pynative/pynative_execute.cc +++ b/mindspore/ccsrc/pipeline/pynative/pynative_execute.cc @@ -1468,7 +1468,7 @@ void PynativeExecutor::Clear(const std::string &flag) { MapClear>(&cell_graph_map_, flag); MapClear>(&cell_resource_map_, flag); MapClear>(&df_builder_map_, flag); - Clean(); + // Maybe exit in the pynative runing op, so need reset pynative flag. auto ms_context = MsContext::GetInstance(); if (ms_context != nullptr) { @@ -1477,6 +1477,7 @@ void PynativeExecutor::Clear(const std::string &flag) { ConfigManager::GetInstance().ResetIterNum(); if (top_graph_cells_.find(flag) != top_graph_cells_.end()) { op_forward_map_.clear(); + Clean(); } return; }