Xilinx / Vitis-AI

Vitis AI is Xilinx’s development stack for AI inference on Xilinx hardware platforms, including both edge devices and Alveo cards.
https://www.xilinx.com/ai
Apache License 2.0
1.42k stars 621 forks source link

When I ran the OFA pruning encountered the problems #1103

Open jia0511 opened 1 year ago

jia0511 commented 1 year ago

When I ran the OFA pruning in the pytorch demo, I encountered the following problems:

Traceback (most recent call last): File "mynet_ofa_pruning.py", line 359, in args.excludes) File "/opt/vitis_ai/conda/envs/vitis-ai-optimizer_pytorch/lib/python3.7/site-packages/pytorch_nndct/pruning/ofa.py", line 189, in ofa_model mod_util.replace_modules(model, name, dynamic_modules, copy_ckpt=True) File "/opt/vitis_ai/conda/envs/vitis-ai-optimizer_pytorch/lib/python3.7/site-packages/pytorch_nndct/utils/module_util.py", line 154, in replace_modules load_modules_ckpt_copy(modules[i], new_modules[i]) File "/opt/vitis_ai/conda/envs/vitis-ai-optimizer_pytorch/lib/python3.7/site-packages/pytorch_nndct/utils/module_util.py", line 79, in load_modules_ckpt_copy newmodules.conv.weight.data.copy(old_modules.weight.data) RuntimeError: The size of tensor a (4) must match the size of tensor b (3) at non-singleton dimension 1

DehuaTang commented 1 year ago

Sorry, I didn't reproduce this issue.