Neural Network Parameter Count Calculator
Calculate the total number of trainable parameters in a feedforward neural network. Enter the number of neurons in each layer (including input and output layers), separated by commas.
First value = input layer, last value = output layer, middle values = hidden layers
Enter layer sizes above and click Calculate.
Formulas
Dense (Fully Connected) Layer:
params = (n_in × n_out) + n_out
└─ weights ─┘ └ biases ┘
Where n_in = neurons in previous layer, n_out = neurons in current layer.
Convolutional Layer:
params = (K × K × C_in × C_out) + C_out
└────── weights ──────┘ └ biases ┘
Where K = kernel size, C_in = input channels, C_out = output filters.
Total Parameters:
Total = Σ params(layer_i) for all layers i = 1 to L
Memory Estimate (float32):
Memory = Total_params × 4 bytes
Assumptions & References
- Reference: Goodfellow, I., Bengio, Y., & Courville, A. (2016). Deep Learning. MIT Press. Chapter 6 (Feedforward Networks), Chapter 9 (CNNs).
- Reference: LeCun, Y. et al. (1998). Gradient-based learning applied to document recognition. Proceedings of the IEEE, 86(11), 2278–2324.