提交 6d1d7c8a 编写于 作者: G guomingz 提交者: Tao Luo

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
上级 dab71e8d
...@@ -634,7 +634,8 @@ class Calibrator(object): ...@@ -634,7 +634,8 @@ class Calibrator(object):
break break
starting_iter = int(0.6 * ending_iter) starting_iter = int(0.6 * ending_iter)
bin_width = hist_edeges[1] - hist_edeges[0] 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_divergence = 0
min_kl_index = 0 min_kl_index = 0
kl_inited = False kl_inited = False
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册