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.48k stars 627 forks source link

vitis optimizer model size reduction #1095

Open yangyazhou97 opened 1 year ago

yangyazhou97 commented 1 year ago

After I read ug1333-ai-optimizer, I execute code from https://github.com/Xilinx/Vitis-AI/tree/master/examples/Vitis-AI-Optimizer/vai_p_pytorch/imagenet_ofa_pruning, but I don't see much reduction in model size, lees than 1M. Is this result correct?

DehuaTang commented 1 year ago

When you perform the following steps and export the subnet, you will get the pruned model. It's not clear what step you've reached

yangyazhou97 commented 1 year ago

I will try this Vitis-AI 3.0 version code, I finished the early Vitis-AI version optimizer code and the reduction in model size was small. https://github.com/Xilinx/Vitis-AI/tree/master/examples/vai_optimizer/pytorch/imagenet_ofa_pruning

DehuaTang commented 1 year ago

It may be that your model is not exported correctly.

yangyazhou97 commented 1 year ago

Maybe, thank you so much.