Skip to content

Commit b6ee3dc

Browse files
authored
Fix missing quantizedBiasType setting for 16x8 requantization (#3597)
1 parent e0b2c28 commit b6ee3dc

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

tensorflow/lite/micro/tools/requantize_flatbuffer_utils.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -264,6 +264,8 @@ def requantize_fully_connected(tensors, buffers, op):
264264
bias_tensor = tensors[op.inputs[2]]
265265
set_bias_type_int64(buffers, input_tensor, weight_tensor, bias_tensor)
266266

267+
op.builtinOptions.quantizedBiasType = TENSOR_TYPE_CODE[np.int64]
268+
267269

268270
def requantize_unidirectional_sequence_lstm(tensors, buffers, op):
269271
"""Requantize the unidirectonal sequance lstm op from int8 to int16 """
@@ -322,4 +324,6 @@ def requantize_transpose_conv(tensors, buffers, op):
322324
if len(op.inputs) > 3:
323325
if op.inputs[3] != -1:
324326
bias_tensor = tensors[op.inputs[3]]
325-
set_bias_type_int64(buffers, input_tensor, weight_tensor, bias_tensor)
327+
set_bias_type_int64(buffers, input_tensor, weight_tensor, bias_tensor)
328+
329+
op.builtinOptions.quantizedBiasType = TENSOR_TYPE_CODE[np.int64]

0 commit comments

Comments
 (0)