Skip to content

how to calculate the macs after prune? #2313

Open
@machengjie321

Description

@machengjie321

🚀 Descirbe the improvement or the new tutorial

I use torch.nn.utils.prune as prune to prune the model, then I use torchprofile.profile_macs() to calculate the macs of Pruned_model, but I find the macs will be increase before prune.remove() to make the pruning permanent. it is normal because additional calculate wil be weight * mask.
but after I use prune.remove() to make the pruning permanent, the macs calculated by torchprofile.profile_macs() still same as the model befor prune.
2023-05-08_17-01-34

Existing tutorials on this topic

No response

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions