diff --git a/paddle/fluid/operators/distributed/communicator.cc b/paddle/fluid/operators/distributed/communicator.cc index ff9909edd7de593f2dce5686b6b2c4e0023dc7f8..9b14e5ca685d2c9116b7721751fcdcff44d56962 100644 --- a/paddle/fluid/operators/distributed/communicator.cc +++ b/paddle/fluid/operators/distributed/communicator.cc @@ -433,6 +433,7 @@ void GeoSgdCommunicator::Send(const std::vector &sparse_var_names, } GeoSgdDenseParamInit(training_scope_, old_scope_.get(), local_var_name); } + return; } std::shared_ptr ids_table = std::make_shared(); diff --git a/python/paddle/fluid/communicator.py b/python/paddle/fluid/communicator.py index 58596a926ff64a36a9cad13d54625b18d1cc3ffc..f43e6467e5a946dbc408be0f2a8267affd05879b 100644 --- a/python/paddle/fluid/communicator.py +++ b/python/paddle/fluid/communicator.py @@ -61,7 +61,7 @@ class Communicator(object): varnames = "&".join(vs["var_names"]) sections = "&".join([str(v) for v in vs["sections"]]) endpoints = "&".join(vs["epmap"]) - is_sparse = "1" if vs["is_sparse"] else "0" + is_sparse = "1" if vs["is_sparse"] == ['True'] else "0" push_var_names.append(k) envs[k] = "#".join([varnames, sections, endpoints, is_sparse])