卷积神经网络的FLOPs和参数量的计算

1. 计算公式

ICLR 2017 一篇 NVIDIA 的 paper 在 APPENDIX A.1 中给出了比较详细的计算公式(公式 11,公式 12);然鹅原文中公式 11 可能有误,HHWW 应为 height and width of the output feature map,而不是 of the input feature map。

卷积神经网络的FLOPs和参数量的计算

对应可以参考知乎 chen liu 的回答

2. 开源库

用 pytorch 搭建的模型有一些库可以得到 FLOPs 和参数量,如 torchstatptflops