diff --git a/neural_compressor/strategy/bayesian.py b/neural_compressor/strategy/bayesian.py index 367031e1982..5749ecf0c15 100644 --- a/neural_compressor/strategy/bayesian.py +++ b/neural_compressor/strategy/bayesian.py @@ -172,7 +172,7 @@ def acq_max(ac, gp, y_max, bounds, random_seed, n_warmup=10000, n_iter=10): for x_try in x_seeds: # Find the minimum of minus the acquisition function res = minimize(lambda x: -ac(x.reshape(1, -1), gp=gp, y_max=y_max), - x_try.reshape(1, -1), + x_try.flatten(), bounds=bounds, method="L-BFGS-B")