TylerYep / torchinfo

View model summaries in PyTorch!
MIT License
2.48k stars 117 forks source link

MAccs of some operations seem to be omitted #126

Open cyh767 opened 2 years ago

cyh767 commented 2 years ago

Hi,

I find torchinfo seems omit the MAccs of some operations like torch.mul and torch.matmul. Is it some feature-to-be-added, or we do not need to count these operations when calculating MAccs?

Thank you for help.

TylerYep commented 2 years ago

Torchinfo currently does not support counting MACs of these raw operations. The current implementation has a lot of room for improvement: https://github.com/TylerYep/torchinfo/blob/main/torchinfo/layer_info.py#L188

PRs addng or improving this functionality are welcome!