Open cVladu opened 2 years ago
@cVladu Hi,there! I am doing the similar thing as "convert CNN with data_format="NHWC" into relay IR" Also I have got problems in the convert from "NCHW" onnx CNN into "NHWC" one.
Is there any learning resources or opensource apis to do this or at least make it easier?
Current Situation: hardware driver background got some tutorials on onnx (both operator & python api) got some tutorials on TVM (beginner)
Wish for your reply, Thanks a lot
I make a fix in #12658 about layout transorm in paddle. However, the data format NHWC is not encouraged in PaddlePaddle framework. More fix will be added to disable layout transorm in paddle maybe.
@cVladu Hi,there! I am doing the similar thing as "convert CNN with data_format="NHWC" into relay IR" Also I have got problems in the convert from "NCHW" onnx CNN into "NHWC" one.
Is there any learning resources or opensource apis to do this or at least make it easier?
Current Situation: hardware driver background got some tutorials on onnx (both operator & python api) got some tutorials on TVM (beginner)
Wish for your reply, Thanks a lot
Maybe you can refer to Convert Layout Pass. And applying the ConvertLayout pass to your relay module.
@cVladu Hi,there! I am doing the similar thing as "convert CNN with data_format="NHWC" into relay IR" Also I have got problems in the convert from "NCHW" onnx CNN into "NHWC" one. Is there any learning resources or opensource apis to do this or at least make it easier? Current Situation: hardware driver background got some tutorials on onnx (both operator & python api) got some tutorials on TVM (beginner) Wish for your reply, Thanks a lot
Maybe you can refer to Convert Layout Pass. And applying the ConvertLayout pass to your relay module.
Yes, this is exactly what I'm looking for. thanks a lot
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 thedata_format
parameter of AdaptiveAvgPool2DEnvironment
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