Comments (3)
def linear(node):
return math.prod(node.inputs[0].shape) * node.inputs[1].shape[0]
Inserting these two lines into handlers.py seems to work well.
from torchprofile.
Thanks for reporting this issue! Would you mind submitting a PR for this change?
from torchprofile.
It seems that linear has been supported in the latest version, as https://github.com/Z-Zheng/torchprofile/blob/a3b483497c30591dd9658ccc0528ecba7c467e4e/torchprofile/handlers.py#L105 presents.
from torchprofile.
Related Issues (18)
- Unused operations seem to be included in FLOPS calculation HOT 8
- the result of macs is not accurate HOT 2
- No handlers found!! HOT 2
- No handlers found "prim::pythonop" and "prim::tupleunpack" HOT 1
- How to set the "args = " , when it comes to transformer or MobileBERT? HOT 1
- No handlers found: "aten::einsum" HOT 4
- No handlers found:"aten::pow"
- No handlers found HOT 1
- No handlers found
- No handlers found: "torchvision::roi_align". Skipped HOT 2
- [Feature Question]FLOPs computation support? HOT 3
- No handlers found: "aten::zeros" and "aten::lstm" Skipped. HOT 4
- profile_macs error at PyTorch 1.4 HOT 2
- missing handlers: aten::squeeze, aten::rsub HOT 1
- Negative MACs HOT 7
- Handlers not found! HOT 1
- Is there a way to get not only the MACs count, but also the model's output? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from torchprofile.