ekalda commented on a change in pull request #7359:
URL: https://github.com/apache/tvm/pull/7359#discussion_r566826298



##########
File path: python/tvm/driver/tvmc/frontends.py
##########
@@ -285,17 +299,17 @@ def suffixes():
         # Torch Script is a zip file, but can be named pth
         return ["pth", "zip"]
 
-    def load(self, path):
+    def load(self, path, input_shape):
         # pylint: disable=C0415
         import torch
 
-        traced_model = torch.jit.load(path)
-
-        inputs = list(traced_model.graph.inputs())[1:]

Review comment:
       I looked into this and I didn't find a way to extract inputs from the 
model after it has been saved and loaded. I asked on the PyTorch forum as well 
(https://discuss.pytorch.org/t/input-size-disappears-between-torch-jit-save-and-torch-jit-load/108955)
 and since I received a grand total of zero responses, I suspect it is a 
deliberate design decision. If there was a way, it would be good to keep it, of 
course, but in that form it doesn't work any more.




----------------------------------------------------------------
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]


Reply via email to