#ifndef PADDLE_ADADELTA_OPTIMIZER_H_ #define PADDLE_ADADELTA_OPTIMIZER_H_ #include "parameter_optimizer.h" namespace paddle { namespace optimizer { template class AdadeltaOptimizer : public ParameterOptimizer { public: AdadeltaOptimizer(const OptimizerConfig &config); ~AdadeltaOptimizer() { if (accum_gradient) delete accum_gradient; if (accum_delta) delete accum_delta; if (update_delta) delete update_delta; } void update(const Tensor &gradient); void set_weight(const Tensor *p); T *get_weight() const; private: Tensor *accum_gradient; Tensor *accum_delta; Tensor *update_delta; double rho; double epsilon; double decay; }; } // namespace optimizer } // namespace paddle #endif