Neural Network Parameter Counts
Count a dense layer, grouped Conv2D layer or explicitly specified conventional decoder with bias, grouping and weight-sharing choices.
Use this result well
- Inputs that matter
- Input features, Output features, Bias parameters, Input channels, and 10 more
- Output to expect
- Dense layer parameters, Conv2D layer parameters, Parameters in the stated architecture
- Check the units and required inputs before comparing results.
- Keep the assumptions with a copied result so you can reproduce the calculation later.
Related Tools
Tools you might need next
Compare measured original and candidate model artifact sizes, retaining growth as a negative reduction and separating size from runtime speed.
Estimate number of air-cleaning plants for room size. Free online bonsai and indoor plants calculator with instant, accurate results.
Calculate aquaculture operation profit from harvest revenue minus feed, fingerling, labor, and overhead costs. Free fish farming profitability calculator.
Reference & details
How it works
Updated September 2026
How it works
Updated September 2026One dense layer parameter count
Parameters = input features × output features + optional output-feature biases One affine layer. Batch size and sequence length do not change its parameter count. Shared tensors must not be counted more than once. This is a parameter count, not total training memory.
One grouped Conv2D layer parameter count
Parameters = output channels × (input channels/groups × kernel height × kernel width + optional bias) One grouped Conv2D layer. Stride, dilation and image size affect output/activation shape, not this kernel count. Depthwise convolution uses groups equal to input channels with compatible output channels. Other layers and activation memory are excluded.
Specified conventional decoder parameter count
Per block = 4d² + 2df + (5d + f) linear biases + 4d LayerNorm; total = L×block + Vd token embedding + Pd learned positions + 2d final LayerNorm + optional Vd untied head Exact algebra for the stated conventional architecture. Includes all four attention linear projections and their biases, both MLP matrices and biases, two affine LayerNorms per block and a final affine LayerNorm. The output head has no bias. Weight tying removes its separate V×d matrix. Gated MLPs, RMSNorm, missing biases, grouped-query attention, mixtures of experts, adapters and other sharing need a different count.
Updated: September 2026
Example Scenarios
Count weights and optional biases for one fully connected layer.
Count a grouped 2D convolution’s kernel weights and optional per-output-channel bias.
Count a conventional decoder with full multi-head Q/K/V attention, a two-matrix MLP, affine LayerNorm, optional learned positions and a tied or untied output head.
Common Mistakes to Avoid
Common Mistakes to Avoid
Applying one dense layer parameter count outside its stated assumptions
Batch size and sequence length do not change its parameter count. Shared tensors must not be counted more than once. This is a parameter count, not total training memory.
Applying one grouped conv2d layer parameter count outside its stated assumptions
Stride, dilation and image size affect output/activation shape, not this kernel count. Depthwise convolution uses groups equal to input channels with compatible output channels. Other layers and activation memory are excluded.
Applying specified conventional decoder parameter count outside its stated assumptions
Includes all four attention linear projections and their biases, both MLP matrices and biases, two affine LayerNorms per block and a final affine LayerNorm. The output head has no bias. Weight tying removes its separate V×d matrix. Gated MLPs, RMSNorm, missing biases, grouped-query attention, mixtures of experts, adapters and other sharing need a different count.
FAQ
About Neural Network Parameter Counts
Count a dense layer, grouped Conv2D layer or explicitly specified conventional decoder with bias, grouping and weight-sharing choices. Choose the mode that matches your measurements or study design, enter the stated units and keep the method and limits with the result.