#ifndef PADDLE_ADAM_OPTIMIZER_H_ #define PADDLE_ADAM_OPTIMIZER_H_ #include "parameter_optimizer.h" namespace paddle { namespace optimizer { template class AdamOptimizer : public ParameterOptimizer { public: AdamOptimizer(const OptimizerConfig &config); ~AdamOptimizer() {} void update(const Tensor &gradient); void set_weight(const Tensor *p); T *get_weight() const; private: Tensor *momentums_; Tensor *velocitys_; double beta_1; double beta_2; double epsilon; double decay; }; } // namespace optimizer } // namespace paddle #endif