🔮 Neural Network Parameter Count Estimator
Estimate the parameter count of fully-connected and convolutional layers from layer widths, kernel sizes and channel counts. Useful for model sizing and memory budgeting.
📐 计算公式 / 原理
全连接参数 = in × out + out(偏置);3×3 卷积参数 = in × out × 9 + out;显存 MB = 参数 × 4 / 1024 / 1024
按层的权重矩阵规模累加估算参数量,再按每参数 4 字节(FP32)折算显存。这只是推理权重的下限,训练还要额外放梯度、优化器状态(Adam 再翻 2 倍)与激活值,实际占用通常是权重的 4–6 倍。
📐 计算公式与说明
全连接:params = in × out + out(bias)
卷积 3×3:params = in × out × 9 + out
卷积 3×3:params = in × out × 9 + out
用于快速估算模型规模。