OpenGVLab / VideoMamba

VideoMamba: State Space Model for Efficient Video Understanding
https://arxiv.org/abs/2403.06977
Apache License 2.0
660 stars 47 forks source link

About FLOPs #22

Closed ncTimTang closed 2 months ago

ncTimTang commented 2 months ago

Thanks for your impressive work. I want to follow your work, but I encounter a problem. How can I calculate the FLOPs of Vim and VideoMamba? Can you share the script with us? Thank you very much!

Andy1621 commented 2 months ago

Please check the __main__ in model files.

alpacaduby commented 2 months ago

Thank you for sharing your work.

I also met the problem, as when I was using the float counting script in the __main__ function, and I tried to print out the unsupported operations, I found the PythonOp.MambaInnerFnNoOutProj in it. Is this normal? Would that mean that when counting flops, the mamba module has not been included?

Thanks.

Where I modified: 17588db2952cc8dc583b593f467b6ac

b663a9f778795e1c7c22dc8eee92b8f

The output 9ec139c8164346776bab783d657eb14

Andy1621 commented 2 months ago

Hi! I'm not sure whether it's normal. And I suggest you follow VMamba for some insights about calculating the GFLOPs manually.