mlw_codec: Fixed alignment warning
- Restructured pointer API to prevent alignment warnings
- Changed weight tensor data type to np.int16
Change-Id: I310c1ca733bf98724c84e8b2194becb4be3e7eea
diff --git a/ethosu/vela/weight_compressor.py b/ethosu/vela/weight_compressor.py
index 4ce03d5..5f21139 100644
--- a/ethosu/vela/weight_compressor.py
+++ b/ethosu/vela/weight_compressor.py
@@ -314,8 +314,8 @@
assert weight_tens.quantization.zero_point is not None
# Early zero-point correction
- quant_buf = weight_tens.quant_values.astype(np.int64)
- weights = quant_buf - weight_tens.quantization.zero_point
+ quant_buf = weight_tens.quant_values.astype(np.int16)
+ weights = quant_buf - weight_tens.quantization.zero_point.astype(np.int16)
if len(weights.shape) == 2:
weights = np.expand_dims(np.expand_dims(weights, axis=0), axis=0)