Giter VIP home page Giter VIP logo

Comments (7)

Lyken17 avatar Lyken17 commented on July 18, 2024

Umm, I don't get what you mean. Can you explain more detailly?

from pytorch-opcounter.

sungsooo avatar sungsooo commented on July 18, 2024

I understand that one multiplication or one addition can be seen as one FLOP.
I wonder what is mean the multiply-add = 1 in your code. How does change when multiply-add = 2?

And can you know me how can I calculate MACs ?

from pytorch-opcounter.

Lyken17 avatar Lyken17 commented on July 18, 2024

In some cases, a multiplication is treated as 2 additions. So I put a multiply_adds constant to ease the modification.

MACs = 2 * FLOPs, you may convert it by yourself. https://en.wikipedia.org/wiki/Multiply%E2%80%93accumulate_operation

from pytorch-opcounter.

sungsooo avatar sungsooo commented on July 18, 2024

Generally, MACs consider multiplication and addition as one operation, as far as I know. Are the FLOPs two operation in that case?

from pytorch-opcounter.

Lyken17 avatar Lyken17 commented on July 18, 2024

I think so.

from pytorch-opcounter.

sungsooo avatar sungsooo commented on July 18, 2024

In this equation MACs = 2 * FLOPs, If I want to get MACs, do I have to multiply FLOPs by 2?
MACs can be bigger than FLOPs according to the equation. But I think the MACs should be smaller than FLOPs.
Does that equation mean multiply-add = 2?
I refer to this site.
https://machinethink.net/blog/how-fast-is-my-model/

from pytorch-opcounter.

sungsooo avatar sungsooo commented on July 18, 2024

Do you plan to make bilinear interpolate layer?

from pytorch-opcounter.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.