You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by "jikechao (via GitHub)" <gi...@apache.org> on 2023/07/10 15:48:25 UTC

[GitHub] [tvm] jikechao opened a new issue, #15283: [Bug]

jikechao opened a new issue, #15283:
URL: https://github.com/apache/tvm/issues/15283

   conv_transpose3d gives an inconsistent inference result with PyTorch.
   
   
   
   
   ### Actual behavior
   ![image](https://github.com/apache/tvm/assets/29506758/d6c2bec6-ad2d-44fb-85a8-78c04e9629c7)
   
   
   ### Steps to reproduce
   
   ```
   import torch
   from tvm import relay
   import tvm
   import numpy as np
   from torch.nn import Module
   
   input_data = torch.randn([1, 64, 8, 128, 172], dtype=torch.float32)
   para_1 = torch.randn([64, 128, 5, 5, 5], dtype=torch.float32)
   para_2 = torch.randn([128], dtype=torch.float32)
   para_3 = (2, 2, 2)
   para_4 = (2, 2, 2)
   para_5 = (1, 1, 1)
   para_6 = 1
   para_7 = (1, 1, 1)
   class conv_transpose3d(Module):
       def forward(self, *args):
           return torch.nn.functional.conv_transpose3d(args[0], para_1,para_2,para_3,para_4,para_5,para_6,para_7,)
   
   
   m = conv_transpose3d().float().eval()
   
   torch_outputs = m(input_data)
   
   trace = torch.jit.trace(m, input_data)
   input_shapes = [('input0', torch.Size([1, 64, 8, 128, 172]))]
   
   mod, params = relay.frontend.from_pytorch(trace, input_shapes)
   with tvm.transform.PassContext(opt_level=3):
       exe = relay.create_executor('graph', mod=mod, params=params, device=tvm.device('llvm', 0), target='llvm').evaluate()
   
   input_tvm = {'input0': np.array(input_data, dtype='float32')}
   tvm_outputs = exe(**input_tvm).asnumpy()
   
   np.testing.assert_allclose(torch_outputs, tvm_outputs, rtol=1e-4, atol=1e-4)
   
   ```
   
   ### Triage
   
   * needs-triage
   * frontend:pytorch


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

To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [Bug] inconsistent inference result about conv_transpose3d operator in pytorch [tvm]

Posted by "tqchen (via GitHub)" <gi...@apache.org>.
tqchen closed issue #15283: [Bug] inconsistent inference result about conv_transpose3d operator in pytorch
URL: https://github.com/apache/tvm/issues/15283


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

To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org