Class AdamMLP

Inheritance Relationships

Base Type

Class Documentation

class AdamMLP : public qb::vqee::VqeOpt

ADAptive Momentum (ADAM) estimator algorithm from the mlpack library ADAM is a stochastic gradient descent algorithm often used in machine learning applications.

Public Functions

inline AdamMLP()

Default constructor - calls the base class and sets the provider name and algorithm name.

inline AdamMLP(const std::vector<double> &in_initial_parameters, const int in_maxeval = 500000, const double in_ftol = 1.0e-4, const YAML::Node &in_node = YAML::Load(""))

Constructor that shows all defaults.

virtual std::shared_ptr<xacc::Optimizer> get() override

Getters.

Private Members

std::set<std::string> integer_valued_fields_ = {}

Extra options accepted by ADAM that will be detected from the YAML string.

Step size for each iteration YAML key: “stepsize” XACC key: “mlpack-step-size” Default: [double] 0.5

Exponential decay rate for the first moment estimates YAML key: “beta1” XACC key: “mlpack-beta1” Default: [double] 0.7

Exponential decay rate for the weighted infinity-norm estimates YAML key: “beta2” XACC key: “mlpack-beta2” Default: [double] 0.999

Mean-squared gradient initial value YAML key: “eps” XACC key: “mlpack-eps” Default: [double] 1.0e-8

Momentum YAML key: “momentum” XACC key: “mlpack-momentum” Default: [double] 0.05

Exact objective YAML key: “exactobjective” XACC key: “adam-exact-objective” Default: [boolean] false Integer-valued fields

std::set<std::string> string_valued_fields_ = {}

String-valued fields.

std::set<std::string> boolean_valued_fields_ = {"exactobjective"}

Boolean-valued fields.

std::set<std::string> double_valued_fields_{"stepsize", "beta1", "beta2", "eps", "momentum"}

Double-valued fields.

std::set<std::string> vector_double_valued_fields_ = {}

Vector of double fields.

std::map<std::string, std::string> all_valid_fields_yaml_xacc_{{"exactobjective", "adam-exact-objective"}, {"stepsize", "mlpack-step-size"}, {"beta1", "mlpack-beta1"}, {"beta2", "mlpack-beta2"}, {"eps", "mlpack-eps"}, {"momentum", "mlpack-momentum"}}

Union of all the above fields. Conversion of keys from YAML -> XACC.