mmrazor
mmrazor copied to clipboard
Problems with purninging tools
Can you use the tool get_channel_units.py to analyze MM3D models?
We are sorry, we don't test MMRazor on any mmdet3d model.
In theory, MMRazor can be applied to any model. Please try to prune a mmdet3d model following our docs.
We make much effort to make MMRazor can prune models automatically. However, there are also some cases we need help to handle. If MMRazor cannot prune a mmdet3d model automatically. Please try the three following steps.
-
First, we need a demo input for your model to conduct forward. We have implemented some demo inputs for some models. You can implement your demo input if they can't satisfy your model. Please refer to demo input for more details.
-
We will trace your model using Fx tracer. Fx tracer requires models to satisfy some requirements to make sure the models are traceable. MMRazor has a modified fx tracer to make it more robust by automatically wrapping untraceable parts. However, it's also limited. It would help to change your model to make it traceable when tracing fails. Please refer to fx tracer for more details.
-
Then, we will convert the traced graph to a ChannelGraph. ChannelGraph is used to analyze the channel dependency with ChannelNodes. Please implement ChannelNodes for the ops that are not pre-defined in MMRazor. Please refer to ChannelNode for more details.