diff options
Diffstat (limited to 'chapters/type_conversion.adoc')
-rw-r--r-- | chapters/type_conversion.adoc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/chapters/type_conversion.adoc b/chapters/type_conversion.adoc index 77af54a..0d84bd6 100644 --- a/chapters/type_conversion.adoc +++ b/chapters/type_conversion.adoc @@ -100,7 +100,8 @@ for_each(index in shape) { ERROR_IF(out_t != int8_t && out_t != uint8_t && output_zp != 0); ERROR_IF(scale32 && in_t == int48_t); ERROR_IF(!scale32 && double_round); - int48_t value = tensor_read<in_t>(input, shape, index, input_zp); + int48_t value = tensor_read<in_t>(input, shape, index); + value = value - input_zp; int c = (per_channel) ? index[dims-1] : 0; int32_t result = (scale32) ? apply_scale_32(value, multiplier[c], shift[c], double_round) : |