#ifndef PADDLE_OPITMIZER_REGULARIZER_H_ #define PADDLE_OPTIMIZER_REGULARIZER_H_ #include "OptimizerConfig.pb.h" #include "Tensor.h" namespace paddle { namespace optimizer { /** * @brief regularizer in L1, L2 */ template class Regularizer { public: /** * @brief regularizer update interface * @param param need to update * @return void */ static Regularizer *create(const std::string &config); virtual void update(Tensor ¶meter) = 0; private: std::string regularizer_name; OptimizerConfig config_; }; template class L1Regularizer { public: void update(Tensor ¶meter); }; template class L2Regularizer { public: void update(Tensor ¶meter); }; } // namespace optimizer } // namespace paddle #endif