MXNET-Python Tool For Calculate Flops And Model Size
Implementation of the estimation of model size and flop counts for convolutional neural networks.
The estimation of flops only consider layers: Convolution, Deconvolution, FullyConnected, Pooling, relu
Running
python calculateFlops.py -s symbols/caffenet-symbol.json -ds data,1,3,224,224 -ls prob_label,1,1000
('flops: ', '723.007176', ' MFLOPS')
('model size: ', '232.563873291', ' MB')
python calculateFlops.py -s symbols/squeezenet_v1.0-symbol.json -ds data,1,3,224,224 -ls prob_label,1,1000
('flops: ', '861.603864', ' MFLOPS')
('model size: ', '4.76235961914', ' MB')
python calculateFlops.py -s symbols/resnet-101-symbol.json -ds data,1,3,224,224 -ls softmax_label,1,1000
('flops: ', '7818.240488