diff --git a/paddle/function/FunctionTest.h b/paddle/function/FunctionTest.h index 2fc51a3aa8afc55cde861a2243fc704e210e0f21..370940532ef40335be54a3e6467de0409e923ec4 100644 --- a/paddle/function/FunctionTest.h +++ b/paddle/function/FunctionTest.h @@ -110,7 +110,7 @@ public: function2_(FunctionBase::funcRegistrar_.createByType(name2)) { function1_->init(config); function2_->init(config); - initArgsCallBack_ = nullptr; + initArgsCallback_ = nullptr; } ~Compare2Function() {} @@ -171,8 +171,8 @@ public: *seq2_)); } - void registerInitCallBack(std::function callback) { - initArgsCallBack_ = callback; + void registerInitCallback(std::function callback) { + initArgsCallback_ = callback; } // output need only contains shape, do not contains data. @@ -345,8 +345,8 @@ protected: initArg(*func1Inputs_[i]); } - if (initArgsCallBack_ != nullptr) { - initArgsCallBack_(*func1Inputs_[i], i); + if (initArgsCallback_ != nullptr) { + initArgsCallback_(*func1Inputs_[i], i); } copyArg_(*func1Inputs_[i], *func2Inputs_[i]); @@ -395,7 +395,7 @@ protected: std::shared_ptr seq1_; std::shared_ptr seq2_; test::CopyArgument copyArg_; - std::function initArgsCallBack_; + std::function initArgsCallback_; }; class CpuGpuFuncCompare diff --git a/paddle/function/MulValueOpTest.cpp b/paddle/function/MulValueOpTest.cpp index c1d5a3e5440e1503f9a1bd94ca9725b343cad640..048660f34fc6574a4f5a04d3a38585bea021e43e 100644 --- a/paddle/function/MulValueOpTest.cpp +++ b/paddle/function/MulValueOpTest.cpp @@ -16,13 +16,6 @@ limitations under the License. */ #include "FunctionTest.h" namespace paddle { -/* - for (size_t numSamples : {5, 32}) { - for (size_t channels : {5, 5, 32}) { - for (size_t imgSizeH : {5, 33, 100}) { - for (size_t imgSizeW : {5, 32, 96}) { - for (real value : {-0.5, 0.0, 0.5}) { -*/ TEST(MulValue, real) { for (size_t numSamples : {5, 32}) { @@ -46,7 +39,7 @@ TEST(MulValue, real) { compare.addInputs(BufferArg(VALUE_TYPE_FLOAT, shape)); compare.addInputs(BufferArg(VALUE_TYPE_FLOAT, indicesShape)); - compare.registerInitCallBack([=](BufferArg& arg, size_t index) { + compare.registerInitCallback([=](BufferArg& arg, size_t index) { if (index == 1) { real* data = (real*)arg.data();