Build deeplabv3 from pytorch in host docker error

Hi All,

This is my first post and I am new to TVM and Pyxir/Vitis AI, please excuse if my question seems silly.

Trying to build deeplabv3 from pytorch to deploy on top of xilinx EDGE device - zcu104. Facing some issue while annotating. Code snippets here:

mod, params = relay.frontend.from_pytorch(scripted_model, shape_list)
mod["main"] = bind_params_by_name(mod["main"], params)
desired_layouts = {'nn.conv2d': ['NHWC', 'default'], 'nn.adaptive_avg_pool2d':['nn.avg_pool2d', 'default']}
seq = tvm.transform.Sequential([relay.transform.RemoveUnusedFunctions(),
with tvm.transform.PassContext(opt_level=3):
    mod = seq(mod)
mod = annotation(mod, params, target) #shows error here

Two doubtful things in output:

  1. /opt/vitis_ai/conda/envs/vitis-ai-tensorflow/lib/python3.6/site-packages/pyxir-0.1.6-py3.6-linux-x86_64.egg/pyxir/frontend/tvm/relay_tools/ UserWarning: Convert Relay Adaptive Avg pool2d layer into normal average pool2d layer warnings.warn(“Convert Relay Adaptive Avg pool2d layer into normal”

  2. File “/opt/vitis_ai/conda/envs/vitis-ai-tensorflow/lib/python3.6/site-packages/pyxir-0.1.6-py3.6-linux-x86_64.egg/pyxir/graph/ops/”, line 167, in concat assert i == axis or len(check) == 1 AssertionError

How to proceed further? Is there any way to change Adaptive Avg pool2d layer to normal average pool2d layer using relay.transform?

Is there any tutorials any one aware of building deeplabv3 for Xilinx EDGE device (from mxnet or pytorch or any other framework)?

Refer this → AssertionError while annotating deeplabv3 model from pytorch · Issue #33 · Xilinx/pyxir · GitHub