!8381 【MSLITE】fix dequant memory bug

From: @guohonhzilonghw
Reviewed-by: @zhang_xue_tong,@ddwsky
Signed-off-by: @zhang_xue_tong
pull/8381/MERGE
mindspore-ci-bot 4 years ago committed by Gitee
commit 373132adef

@ -122,9 +122,9 @@ class DequantUtil {
uint_result = 0;
(*count)++;
}
if (is_last) {
int remainder = unpack_bit_data->size();
for (int i = 0; i < remainder; i++) {
size_t remainder = unpack_bit_data->size();
if (is_last && remainder > 0) {
for (size_t i = 0; i < remainder; i++) {
bool bit = unpack_bit_data->front();
uint_result = (static_cast<int>(bit) << i) + uint_result;
unpack_bit_data->pop();

Loading…
Cancel
Save