noahzn / Lite-Mono

[CVPR2023] Lite-Mono: A Lightweight CNN and Transformer Architecture for Self-Supervised Monocular Depth Estimation
MIT License
540 stars 61 forks source link

Can you share the code for calculating FLOPs? #29

Closed whyygug closed 1 year ago

whyygug commented 1 year ago

Thank you for the wonderful work!

I would like to know how you calculate the FlOPs? What libraries do you use? I have tried using FVCORE to calculate FLOPs, but that library does not seem to support GELU. In addition, many libraries do not support models with lists in the input, so they cannot calculate FLOPs for the depth decoder. Can you share the code for calculating FLOPs? Many thanks!

noahzn commented 1 year ago

Hi, thank you for your interest in our work!

This function calculates the parameters and FLOPs. The library is thop.

whyygug commented 1 year ago

Thank you very much for your quick reply!