leandron commented on a change in pull request #7400:
URL: https://github.com/apache/tvm/pull/7400#discussion_r573551305
##########
File path: python/tvm/relay/frontend/tflite.py
##########
@@ -3588,8 +3643,14 @@ def from_tflite(model, shape_dict, dtype_dict):
exp_tab = ExprTable()
for model_input in model_inputs:
model_input_name = get_tensor_name(subgraph, model_input)
- shape = shape_dict[model_input_name] if model_input_name in shape_dict
else None
- dtype = dtype_dict[model_input_name] if model_input_name in dtype_dict
else "float32"
+ if shape_dict:
+ shape = shape_dict[model_input_name] if model_input_name in
shape_dict else None
+ else:
+ shape = get_tensor_shape(subgraph, model_input)
+ if dtype_dict:
+ dtype = dtype_dict[model_input_name] if model_input_name in
dtype_dict else "float32"
+ else:
+ dtype = get_tensor_type(subgraph, model_input)
Review comment:
Cool. I think we both agree that it is better to have the funcionality
only in the tflite.py, and remove it from TVMC.
So I suggest we keep the one that accounts for many subgraphs, and move it
from TVMC to the official frontend? If you agree, feel free to do it in this PR.
----------------------------------------------------------------
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:
[email protected]