neural_compressor.strategy.bayesian
The Bayesian tuning strategy.
Classes
The Bayesian tuning strategy. |
|
Holds the param-space coordinates (X) and target values (Y). |
|
The class for bayesian optimization. |
Functions
|
Find the maximum of the acquisition function parameters. |
Module Contents
- class neural_compressor.strategy.bayesian.BayesianTuneStrategy(model, conf, q_dataloader=None, q_func=None, eval_func=None, eval_dataloader=None, eval_metric=None, resume=None, q_hooks=None)[source]
The Bayesian tuning strategy.
- neural_compressor.strategy.bayesian.acq_max(ac, gp, y_max, bounds, random_seed, n_warmup=10000, n_iter=10)[source]
Find the maximum of the acquisition function parameters.
- Parameters:
ac – The acquisition function object that return its point-wise value.
gp – A gaussian process fitted to the relevant data.
y_max – The current maximum known value of the target function.
bounds – The variables bounds to limit the search of the acq max.
random_seed – instance of np.RandomState random number generator
n_warmup – number of times to randomly sample the acquisition function
n_iter – number of times to run scipy.minimize
- Returns:
The arg max of the acquisition function.
- Return type:
x_max