From 885275ee77ddafa28cda0135fa752ca9d8afe1c8 Mon Sep 17 00:00:00 2001 From: Zhaolong Xing Date: Fri, 16 Jun 2017 14:59:18 +0800 Subject: [PATCH] Update ParameterUpdaterHook.cpp --- paddle/parameter/ParameterUpdaterHook.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/paddle/parameter/ParameterUpdaterHook.cpp b/paddle/parameter/ParameterUpdaterHook.cpp index 1cc91b727a..738e86a622 100644 --- a/paddle/parameter/ParameterUpdaterHook.cpp +++ b/paddle/parameter/ParameterUpdaterHook.cpp @@ -70,10 +70,8 @@ public: for (size_t i = 0; i < para->getSize(); i++) param.push_back(std::make_pair(fabs(vecCpu->getData()[i]), i)); - std::partial_sort(param.begin(), - param.begin() + nonZeroNum, - param.end(), - sortPairAscend); + std::partial_sort( + param.begin(), param.begin() + nonZeroNum, param.end(), sortPairAscend); for (size_t i = 0; i < nonZeroNum; i++) dataPtr[param[i].second] = 1.0; // Currently just use a mask vector for hack. -- GitLab