Train Map#

template<typename MemorySpace>
double mpart::TrainMap(std::shared_ptr<ConditionalMapBase<MemorySpace>> map, std::shared_ptr<MapObjective<MemorySpace>> objective, TrainOptions options)#

Function to train a map inplace given an objective and optimization options.

  • map – Map to optimize (inplace)

  • objective – MapObjective to optimize over

  • options – Options for optimizing the map

struct TrainOptions#

TrainOptions adds options for training your map, with fields largely based on NLopt settings. For documentation of such fields, see NLOpt.

Subclassed by mpart::ATMOptions

Public Functions

inline std::string String()#

Create a string representation of these training options (helpful for bindings)


std::string Every option value in this struct

Public Members

std::string opt_alg = "LD_SLSQP"#

NLOpt: Optimization Algorithm to use

double opt_stopval = -std::numeric_limits<double>::infinity()#

NLOpt: Lower bound on optimizer

double opt_ftol_rel = 1e-3#

NLOpt: Relative tolerance on function value change

double opt_ftol_abs = 1e-3#

NLOpt: Absolute tolerance of function value change

double opt_xtol_rel = 1e-4#

NLOpt: Relative tolerance of minimizer value change

double opt_xtol_abs = 1e-4#

NLOpt: Absolute tolerance of minimizer value change

int opt_maxeval = 1000#

NLOpt: Maximum number of evaluations of function to optimize

double opt_maxtime = std::numeric_limits<double>::infinity()#

NLOpt: Maximum amount of time to spend optimizing

int verbose = 0#

Verbosity of map training (1: verbose, 2: debug)