Estimate forward-pass FLOPs from fully-connected and convolutional layer dimensions, to compare model architectures before training.
FLOPs 衡量模型计算量。
全连接层 FLOPs≈2·in·out·batch·seq(乘加各算一次)。