提交 73470b28 编写于 作者: R RachelXu7

Add ACT/FullQuant Demo

上级 66d83fea
...@@ -65,9 +65,7 @@ def eval_function(exe, compiled_test_program, test_feed_names, ...@@ -65,9 +65,7 @@ def eval_function(exe, compiled_test_program, test_feed_names,
label = np.array(label).reshape((-1, 1)) label = np.array(label).reshape((-1, 1))
sort_array = pred.argsort(axis=1) sort_array = pred.argsort(axis=1)
top_1_pred = sort_array[:, -1:][:, ::-1] top_1_pred = sort_array[:, -1:][:, ::-1]
# print(label, top_1_pred)
top_1 = np.mean(label == top_1_pred) top_1 = np.mean(label == top_1_pred)
# print(top_1)
top_5_pred = sort_array[:, -5:][:, ::-1] top_5_pred = sort_array[:, -5:][:, ::-1]
acc_num = 0 acc_num = 0
for i in range(len(label)): for i in range(len(label)):
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册