Cuogeihong / CEASC

The official implementation of CEASC
Apache License 2.0
106 stars 13 forks source link

How to calculate the FLOPs of SparseConv? #17

Open Shichang-Fu opened 1 year ago

Shichang-Fu commented 1 year ago

Hello, author. I am trying to replicate your work. I am using mmdetection/tools/analysis_tools/get_flops.py to obtain the model's FLOPs. However, I have noticed that this function does not capture the FLOPs for DyConv2D. Could you please explain how you calculate FLOPs for sparse convolutions?Thanks image

Cuogeihong commented 1 year ago

these codes return masks while inference and you can calculate gflops manually. https://github.com/Cuogeihong/CEASC/blob/2abfd1a99f1b0fe1ed3d51588b64549e1584da50/mmdet/models/dense_heads/gfl_dy_head.py#L269-L271