Lyken17 / pytorch-OpCounter

Count the MACs / FLOPs of your PyTorch model.
MIT License
4.9k stars 528 forks source link

Does it think about to support torch.nn.PixelShuffle? It is widely used in Super-Resolution. #178

Closed wangqiim closed 2 years ago

wangqiim commented 2 years ago

https://pytorch.org/docs/stable/generated/torch.nn.PixelShuffle.html

wangqiim commented 2 years ago

It looks like it's always going to be 0 Flops :joy:

Lyken17 commented 2 years ago

I think it is already added? PixelShuffle operation does not contain any multiplications, thus should be zero macs.

wangqiim commented 2 years ago

I don't think it is added. I just open a pull request.

Lyken17 commented 2 years ago

PR Merged. Thanks for the contribution!