.. index:: pair: class; QPanda::Variational::VanillaGradientDescentOptimizer .. _doxid-class_q_panda_1_1_variational_1_1_vanilla_gradient_descent_optimizer: class QPanda::Variational::VanillaGradientDescentOptimizer ========================================================== .. toctree:: :hidden: .. ref-code-block:: cpp :class: doxyrest-overview-code-block #include class VanillaGradientDescentOptimizer: public :ref:`QPanda::Variational::Optimizer` { public: // construction :target:`VanillaGradientDescentOptimizer`( :ref:`var` lost_function, double learning_rate = 0.01, double stop_condition = 1.e-6, :ref:`OptimizerMode` mode = :ref:`OptimizerMode::MINIMIZE` ); // methods virtual std::unordered_set<:ref:`var`> :target:`get_variables`(); virtual std::unordered_map<:ref:`var`, MatrixXd> :target:`compute_gradients`(std::unordered_set<:ref:`var`>& var_set); virtual double :target:`get_loss`(); virtual bool :target:`run`( std::unordered_set<:ref:`var`>& leaves, size_t t = 0 ); static std::shared_ptr<:ref:`Optimizer`> :target:`minimize`( :ref:`var`, double, double ); }; Inherited Members ----------------- .. ref-code-block:: cpp :class: doxyrest-overview-inherited-code-block public: // methods virtual std::unordered_set<:ref:`var`> :ref:`get_variables`() = 0; virtual std::unordered_map<:ref:`var`, MatrixXd> :ref:`compute_gradients`(std::unordered_set<:ref:`var`>& var_set) = 0; virtual double :ref:`get_loss`() = 0; virtual bool :ref:`run`(std::unordered_set<:ref:`var`>& leaves, size_t t = 0) = 0;