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