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

   I tried to convert a paddle network containing an AdaptiveAvgPool2D with 
data_format="NHWC" into relay IR
   
   ### Expected behavior
   
   The network is correctly converted
   
   ### Actual behavior
   
   The `frontend.from_paddle` ignores the `data_format` parameter of 
AdaptiveAvgPool2D
   
   ### Environment
   
   Operating system:
   Distributor ID: Ubuntu
   Description: Ubuntu 18.04.6 LTS
   Release: 18.04
   Codename: bionic
   
   TVM version: 0.10.dev0 (commit 3d41ac3a9)
   Steps to build the TVM were followed from: 
https://tvm.apache.org/docs/install/from_source.html -- no change to 
config.cmake file
   
   ### Steps to reproduce
   
   ```
   def test_adaptive_pool():
       import paddle
       
       class PaddleNet(paddle.nn.Layer):
           def __init__(self):
               super(PaddleNet, self).__init__()
               self.adaptive_pool = paddle.nn.AdaptiveAvgPool2D(output_size=20, 
data_format="NHWC")
           
           @paddle.jit.to_static(input_spec=[paddle.static.InputSpec(shape=(8, 
32, 32, 3), dtype=paddle.float32, name="x")])
           def forward(self, x):
               return self.adaptive_pool(x)
   
       paddle_net = PaddleNet()
       import tempfile
       import os
       with tempfile.TemporaryDirectory() as tmp_d:
           paddle.jit.save(paddle_net, os.path.join(tmp_d, "paddle_model"))
           loaded_net = paddle.jit.load(os.path.join(tmp_d, "paddle_model"))
       mod, params = relay.frontend.from_paddle(loaded_net)
       mod = tvm.relay.transform.InferType()(mod)
       print(mod.astext())
   ```
   
   


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to