tidymodels / brulee

High-Level Modeling Functions with 'torch'
https://brulee.tidymodels.org/
Other
67 stars 7 forks source link

LBFGS optimizer isn't used when fitting an mlp #61

Closed ChristianAmes closed 10 months ago

ChristianAmes commented 1 year ago

When choosing LBFGS optimizer in brulee_mlp() it gets set in the following part of mlp_fit_imp ():

https://github.com/tidymodels/brulee/blob/a94ec7a33320f9d83c355351743fcb6564744c84/R/mlp-fit.R#L660-L668

However, in each epoch, the optimizer gets overwritten with an SGD optimizer:

https://github.com/tidymodels/brulee/blob/a94ec7a33320f9d83c355351743fcb6564744c84/R/mlp-fit.R#L697

This leads to the LBFGS optimizer never being used.

Is this an intended behaviour ?

github-actions[bot] commented 10 months ago

This issue has been automatically locked. If you believe you have found a related problem, please file a new issue (with a reprex: https://reprex.tidyverse.org) and link to this issue.