diff options
Diffstat (limited to 'ethosu/vela')
-rw-r--r-- | ethosu/vela/weight_compressor.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ethosu/vela/weight_compressor.py b/ethosu/vela/weight_compressor.py index 4ce03d55..5f211393 100644 --- a/ethosu/vela/weight_compressor.py +++ b/ethosu/vela/weight_compressor.py @@ -314,8 +314,8 @@ def encode_weight_and_scale_tensor( 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) |