wujian16 / Cornell-MOE

A Python library for the state-of-the-art Bayesian optimization algorithms, with the core implemented in C++.
Other
262 stars 64 forks source link

[Question] About the derivitive mode. How I pass the derivative to the optimizer if I write the objective function with a autodifferentiation code? #93

Open floatingCatty opened 1 year ago

floatingCatty commented 1 year ago

Hello! Thanks for providing such a powerful library.

I am currently implementing some optimization algorithm that combine the gradient descent and BO. And the code is written with pytorch, so, in each evaluation, I can get the gradient of the loss w.r.t. the parameters. How can I pass the gradient to the BO optimizer with derivatives to accelerate its convergence ?

Thanks a lot for your time.

MaAl13 commented 8 months ago

I have the same problem