Lyken17 / pytorch-OpCounter

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

Does anyone knows how to compute FLOPs or MACs in a quaternion networks? #132

Open azzurras18 opened 3 years ago

azzurras18 commented 3 years ago

I have seen your implementation to see MACs in a neural network, and it is amazing. However, if I used it in a quaternion network I got: Warning: module QuaternionConv is treated as a zero-op. Warning: module QuaternionTransposeConv is treated as a zero-op.

Do you know how I could do?

Lyken17 commented 3 years ago

You will need to write the couting rules for customized modules. Can you share the implementation of quaternion net so I can provide an example?

Liujingxiu23 commented 3 years ago

@Lyken17 I meet the same problem. I do not know how to write the couting rules for my own model. Can you take the submodule "TextEnc" in https://github.com/LEEYOONHYUNG/BVAE-TTS/blob/master/modules/module.py for example. Or any other modules that are similar to this one to show what I should do.