Fix the KL algorithm bug when calculated the size of tensor. (#17198)

* resolve #17184

Fix the KL algorithm bug when calculated the size of tensor.

* Add the missing test=develop.

test=develop
revert-17304-fix_default_paddle_version
guomingz 6 years ago committed by Tao Luo
parent dab71e8d97
commit 6d1d7c8acf

@ -634,7 +634,8 @@ class Calibrator(object):
break
starting_iter = int(0.6 * ending_iter)
bin_width = hist_edeges[1] - hist_edeges[0]
P_sum = len(activation_blob)
P_sum = len(np.array(activation_blob).ravel())
min_kl_divergence = 0
min_kl_index = 0
kl_inited = False

Loading…
Cancel
Save