euntaik commented on a change in pull request #7400:
URL: https://github.com/apache/tvm/pull/7400#discussion_r573581898
##########
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:
Thanks, I will update the 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]