clovaai / EXTD_Pytorch

Official EXTD Pytorch code

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Aboute compute_flops

li3cmz opened this issue · comments

commented

Have you ever test the FLOPs of the model by Pytorch-OpCounter

I test by Pytorch-OpCounter, and I get the Flops and Params is as bellows:
image

But when I use the compute_flops function of your code, I get the FLOPs result as follows:
11.15 G

Is there any problem for your algorithms to compute FLOPs?

The version of model I test is "EXTD_64"

@li3cmz
Thank you for the nice comment.
We calculated the Flops assuming that the input-image has 640x640 resolution.

Then, our results are given as follows: (ours) -> (OpConter)

S3FD: 127G -> 128.65G
EXTD_64: 11.15G -> 14.43G
EXTD_48: 6.67G -> 8.67G
EXTD_32: 4.51G -> 6.16G

It is because that our own flop computing function just calculate the flops from conv filters, but the Pytorch-OpCounter calculates all the other functions such as BN, which is more accurate.
Thank you for the comment and I will update it asap :)

commented

Thanks!
I have also commnicated with the author of Op-Counter about one day ago. And now all of the FLOPs computations is reasonable and correct~