zhijian-liu / torchprofile

A general and accurate MACs / FLOPs profiler for PyTorch models
https://pypi.org/project/torchprofile/
MIT License
560 stars 38 forks source link

How to set the "args = " , when it comes to transformer or MobileBERT? #15

Closed pengfeiZhao1993 closed 3 years ago

pengfeiZhao1993 commented 3 years ago

def profile_macs(model, args=(), kwargs=None, reduction=sum): results = dict()

graph = trace(model, args, kwargs)

pengfeiZhao1993 commented 3 years ago

I have solve it.