Skip to content

stwerner97/minimal-bayesopt

Repository files navigation

CI Open in Colab

Minimal-BayesOpt

A minimal example of using Bayesian Optimization to tune the learning rate of a ResNet on FashionMNIST.

The contents of this repository can be run in Google Colaboratory or by cloning the repository.

Each plot shows the parameters sampled so far and their objective value (F1 validation score). The cross highlights the best performing parameter. The black line and orange area around it show the posterior mean and uncertainty estimates, respectively. Additionally, we show functions samples from the posterior in grey. Below, the acquisition function landscape (here: expected improvement) is shown.

Installation

From Source

The simplest option is to install the dependencies of minimal-bayesopt using pip:

pip install -e .

This is equivalent to running pip install -r requirements.txt.

Example Usage

The Bayesian Optimization can be run via script.py:

python script.py --niters 10 --max_epochs 20 --num_gpus 1 --output bayesopt.pdf

For additional options, please check the script.py file.

About

A minimal example of using Bayesian Optimization.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published