Giter VIP home page Giter VIP logo

Comments (10)

AntonioCarta avatar AntonioCarta commented on July 28, 2024 1

A simple implementation can ignore the cost of activation functions and only compute the cost of feedforward and convolutional layers. Then you have to manage all the cases for convolutional layers.

The biggest problem is that for convolutional layers you need to know the input size, and therefore the layer's order.

from avalanche.

AntonioCarta avatar AntonioCarta commented on July 28, 2024 1

Yes, that may be a solution. It should also be possible with forward hooks without subclassing.
I can try to implement it.

from avalanche.

vlomonaco avatar vlomonaco commented on July 28, 2024

@AntonioCarta Maybe we can create a script that given a pytorch model:

  1. Convert every conv layer into a custom conv layer which also counts MAC for it (on-the-fly during the forward pass) and saves them in a common attribute of the model object (let's say a dict).
  2. Run the model on the first mini-batch of the chosen benchmark and return MAC statistics

What do you think?

from avalanche.

akshitac8 avatar akshitac8 commented on July 28, 2024

@AntonioCarta Is this issue solved?

from avalanche.

AntonioCarta avatar AntonioCarta commented on July 28, 2024

Not yet. If you want you can work on this @akshitac8.

from avalanche.

AntonioCarta avatar AntonioCarta commented on July 28, 2024

@akshitac8 are you working on this? It's not clear to me since I see that I am still assigned to the issue. Please give me a confirmation and assign the issue to yourself if you are taking it.
Otherwise I will work on this.

from avalanche.

akshitac8 avatar akshitac8 commented on July 28, 2024

I am sorry for not giving you a clear sign on it. I had a medical emergency but now I have started working on this bust not clear just MAC metric is needed or both this issue and #60 are related?
if you can clear me on this and then you can assign me the issue :)

from avalanche.

vlomonaco avatar vlomonaco commented on July 28, 2024

@AntonioCarta any news on this? Should we disassign this issue?

from avalanche.

AntonioCarta avatar AntonioCarta commented on July 28, 2024

Sorry, I forgot this issue was still assigned to me. I can do it (with the limitations discussed above), give me about a week of time to complete it.

from avalanche.

vlomonaco avatar vlomonaco commented on July 28, 2024

This may be interesting to look into when we want to upgrade the profiler: https://github.com/zhijian-liu/torchprofile

from avalanche.

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.