Unverified Commit 9f65f12a authored by DOWN-LEE's avatar DOWN-LEE Committed by GitHub
Browse files

fix the bug that weights are not initialized correctly in adaptive_parzen… (#5032)



* fix the bug that weights are not defined correctly in adaptive_parzen_normal of TPE

* Align code style
Co-authored-by: default avatardown-lee <down.lee@navercorp.com>
Co-authored-by: default avatarliuzhe-lz <40699903+liuzhe-lz@users.noreply.github.com>
parent 75e5d5b5
......@@ -411,7 +411,7 @@ def adaptive_parzen_normal(args, history_mus, prior_mu, prior_sigma):
n = min(100, len(mus) + 1)
sigmas = np.clip(sigmas, prior_sigma / n, prior_sigma)
weights = np.append(linear_forgetting_weights(args, len(mus)), args.prior_weight)
weights = np.append(linear_forgetting_weights(args, len(mus) - 1), args.prior_weight)
weights = weights[order]
return weights / np.sum(weights), mus, sigmas
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment