masahi commented on a change in pull request #5204: [Frontend][Torch] Fix up
graph input handling
URL: https://github.com/apache/incubator-tvm/pull/5204#discussion_r401747683
##########
File path: tests/python/frontend/pytorch/test_forward.py
##########
@@ -890,11 +889,12 @@ def test_3d_models():
def verify_script_model(pt_model, ishapes):
script_module = torch.jit.script(pt_model)
- input_names = get_graph_input_names(script_module)
- input_shapes = dict(zip(input_names, ishapes))
- inputs = [torch.randn(input_shapes[input_name], dtype=torch.float)
- for input_name in input_names]
+ input_names = ["i{}".format(idx) for idx, ish in enumerate(ishapes)]
+ input_shapes = list(zip(input_names, ishapes))
+
+ inputs = [torch.randn(shape, dtype=torch.float)
+ for name, shape in input_shapes]
Review comment:
`for shape in ishapes`
----------------------------------------------------------------
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