cchung100m commented on a change in pull request #5073: [Relay][Frontend][ONNX]
operator support NonZero
URL: https://github.com/apache/incubator-tvm/pull/5073#discussion_r394358064
##########
File path: tests/python/frontend/onnx/test_forward.py
##########
@@ -30,22 +30,54 @@
import scipy
-def get_tvm_output(graph_def, input_data, target, ctx, output_shape=None,
output_dtype='float32', opset=None):
- """ Generic function to execute and get tvm output"""
- target = 'llvm'
+def get_input_data_shape_dict(graph_def, input_data):
if isinstance(input_data, list):
input_names = {}
shape_dict = {}
- dtype_dict = {}
for i, _ in enumerate(input_data):
input_names[i] = graph_def.graph.input[i].name
shape_dict[input_names[i]] = input_data[i].shape
- dtype_dict[input_names[i]] = input_data[i].dtype
else:
input_names = graph_def.graph.input[0].name
shape_dict = {input_names: input_data.shape}
+
+ return input_names, shape_dict
+
+
+def get_input_data_dtype_dict(graph_def, input_data):
Review comment:
Hi @kazum
Thanks for the review and I can remove it here.
----------------------------------------------------------------
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]
With regards,
Apache Git Services