masahi commented on issue #6432:
URL: https://github.com/apache/incubator-tvm/issues/6432#issuecomment-689772525


   @j-paulus this should be fixed in 
https://github.com/apache/incubator-tvm/pull/6433. The following script works 
for me
   
   ```
   import torch
   from tvm import relay
   
   class TriggerBug(torch.nn.Module):
       def __init__(self):
           super(TriggerBug, self).__init__()
           self.bn = torch.nn.BatchNorm2d(8)  # input C:(N,C,H,W)
   
       def forward(self, x):
           x = torch.stack((x, x), dim=3)
           return self.bn(x)
   
   x_in = torch.randn(8, 8, 8)
   torch_model = TriggerBug()
   traced_model = torch.jit.trace(torch_model, (x_in,))
   
   mod, params = relay.frontend.from_pytorch(traced_model, [('x_in', 
x_in.shape)])
   
   print(mod["main"])
   ```
   
   Thanks for reporting many issues in the PyTorch frontend. I really 
appreciate them!


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