siju-samuel commented on a change in pull request #5329: [Relay][Frontend][TFLite] Add parser support for shape and range URL: https://github.com/apache/incubator-tvm/pull/5329#discussion_r408060463
########## File path: python/tvm/relay/frontend/tflite.py ########## @@ -579,6 +581,49 @@ def convert_tanh(self, op): return out + def convert_range(self, op): + """Convert TFLite Range""" + try: + from tflite.Operator import Operator + except ImportError: + raise ImportError("The tflite package must be installed") + + if self.is_quantized(op): + raise tvm.error.OpNotImplemented( + 'TFlite quantized RANGE operator is not supported yet.') + + assert isinstance(op, Operator) + input_tensors = self.get_input_tensors(op) + assert len(input_tensors) == 3, "input tensors length should be 3" + + start, limit, delta = self.get_expr(input_tensors[0].tensor_idx),\ + self.get_expr(input_tensors[1].tensor_idx),\ + self.get_expr(input_tensors[2].tensor_idx) + + + out = _op.arange(start, limit, delta, "int32") Review comment: Why only integer range support? ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services