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