[mlpack] ensmallen 2.10.0 released

Ryan Curtin ryan at ratml.org
Sat Sep 7 11:42:43 EDT 2019


Hello there,

I don't usually announce ensmallen releases on this list because there
tend to be a lot of them since we have streamlined the release process,
but this one is a major version bump and I think it's worth announcing,
because it could affect mlpack (in a positive way!).

The 2.10.0 release of ensmallen (which I named "Fried Chicken" because
of my dinner last night... it was good) contains two major improvements:

 * Templated Optimize()

 * Callback support

To be more specific, now, any Optimize() function from an ensmallen
optimizer can be used with various matrix types.  So, instead of
Optimize(FunctionType&, arma::mat&), which was all we could do before,
we can now do Optimize(FunctionType&, arma::fmat&),
Optimize(FunctionType&, arma::sp_mat&), or even Optimize(FunctionType&,
my_favorite_mat&), so long as whatever matrix class is used matches the
Armadillo API and has all the functions needed.

For callbacks, this now means that Optimize() can take any number of
extra arguments that specify some special behavior to be taken when the
optimization is run.  So, for instance, calling

    Optimize(FunctionType&, arma::mat&, PrintLoss())

means that the objective function's value will be printed during the
optimization.  There are also other callbacks, like ProgressBar,
EarlyStopAtMinLoss, and others; see the documentation here:

http://ensmallen.org/docs.html#callback-documentation

I think that both of these things could be used in the mlpack codebase
to simplify the code (especially in the models/ repository) and give
nicer output during optimizations.

I hope that we find this functionality useful! :)

Have a great weekend!

Thanks,

Ryan

-- 
Ryan Curtin    | "I like this game."
ryan at ratml.org |   - Coach


More information about the mlpack mailing list