From 56cd1ecabe2c7f2b51c4515a6cf0d42e2bc3993a Mon Sep 17 00:00:00 2001 From: Liufang Sang Date: Tue, 2 Jun 2020 17:08:14 +0800 Subject: [PATCH] add power to quant_embedding dict (#289) --- paddleslim/quant/quant_embedding.py | 1 + 1 file changed, 1 insertion(+) diff --git a/paddleslim/quant/quant_embedding.py b/paddleslim/quant/quant_embedding.py index c5c3bc62..2e4f2298 100755 --- a/paddleslim/quant/quant_embedding.py +++ b/paddleslim/quant/quant_embedding.py @@ -334,6 +334,7 @@ def _quant_embedding_log(graph, scope, place, config, var_name, # get quantize dict and quanted tensor topk_num, quanted_tensor = _quant_log(embedding_tensor, config) + topk_num = np.power(2, topk_num) #create params must use create_persistable_node topk_num_var = graph.create_persistable_node( -- GitLab