Counting the number of Multiply-Add operations (MAC)

392 views
Skip to first unread message

Rafael Padilha

unread,
Jun 12, 2017, 3:35:56 PM6/12/17
to Caffe Users
Hello guys,

Lately I've been benchmarking some CNNs regarding time, # of multiply-add operations (MAC), # of parameters and model size.
I have found Netscope CNN Analyzer that allows me to calculate most of those things just by inputing my network definition.

However, the number of multiply-add operations of some architectures I've seen in papers and over the internet doesn't match what Netscope is outputting, whereas other architectures match. I'm always comparing either FLOPs or MAC with the MACC column in netscope, but there a ~10x factor that I'm forgetting at some point (check table bellow for more detail).

Architecture  ----  MAC (paper/internet) ---- macc column in netscope
VGG 16                            ~15.5G                                  ~157G
GoogLeNet                       ~1.55G                                  ~16G



Does anybody that used that tool could point me out on what mistake I'm doing while reading Netscope output?

Thank you very much for your help!

 

Rafael Padilha

unread,
Jun 13, 2017, 9:20:26 AM6/13/17
to Caffe Users
Guys,

I've found what was causing the discrepancy between Netscope and the information I've found in papers and over the internet.

Most preset architectures in Netscope were using a batch size of 10 images, hence the x10 factor multiplying macc.

[]s,
Rafael S. Padilha

--
You received this message because you are subscribed to a topic in the Google Groups "Caffe Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/caffe-users/p4rWcmBShrk/unsubscribe.
To unsubscribe from this group and all its topics, send an email to caffe-users+unsubscribe@googlegroups.com.
To post to this group, send email to caffe...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/caffe-users/104f1602-c8db-4575-8a94-30f4eb23dc76%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages