MLBEDSW-3927: Fix wrong compression ratio
Change-Id: I06feeb98fb48badf06097f377a9504e6f4eeae91
Signed-off-by: Diqing Zhong <diqing.zhong@arm.com>
diff --git a/ethosu/vela/weight_compressor.py b/ethosu/vela/weight_compressor.py
index 188b16a..60ca846 100644
--- a/ethosu/vela/weight_compressor.py
+++ b/ethosu/vela/weight_compressor.py
@@ -521,6 +521,9 @@
compress_weights(
arch, nng, tens, op.type.npu_block_type, ps.block_config[-1], ofm_depth_step, op.get_dilation_h_w()
)
+ nng.total_compressed_weights += tens.weight_compressed_offsets[-1]
+ nng.total_original_weights += tens.elements() * tens.element_size()
+
# Update source tensor
if needs_dma:
src_tens = tens.get_dma_src_tensor()