diff --git a/python/tvm/relay/frontend/tflite.py b/python/tvm/relay/frontend/tflite.py index 58adf8d9f15bc..d88589ee722cc 100644 --- a/python/tvm/relay/frontend/tflite.py +++ b/python/tvm/relay/frontend/tflite.py @@ -728,7 +728,7 @@ def convert_relu(self, op): zero_point=zero_point_val, dtype=output_tensor_type_str) else: - out = _op.clip(in_expr, a_min=0, a_max=6) + out = _op.nn.relu(in_expr) if output_tensor.qnn_params: output_tensor_type_str = self.get_tensor_type_str(output_tensor.tensor.Type()) diff --git a/tests/python/frontend/tflite/test_forward.py b/tests/python/frontend/tflite/test_forward.py index bea0a1b6c0060..989a38aefdc2a 100644 --- a/tests/python/frontend/tflite/test_forward.py +++ b/tests/python/frontend/tflite/test_forward.py @@ -1814,7 +1814,7 @@ def _test_quantize_dequantize(data): # Keras model to force TFLite converter to insert 2 TFLite quantize ops. # First TFLite quantize op converts float32 tensor to int8 tensor - Qnn quantize. - # Second TLite quantize op converts int8 tensor to int8 tensor - Qnn requantize. + # Second TFLite quantize op converts int8 tensor to int8 tensor - Qnn requantize. data_in = tf.keras.layers.Input(shape=data.shape[1:]) relu = tf.keras.layers.ReLU()(data_in) add = tf.keras.layers.Add()([data_in, relu])