Weighted sum calculator
Formula Used
Each input is multiplied by its matching weight. The products are added before the bias is included. The final value is the neuron's pre-activation output.
Batch rows represent samples in the input matrix. Weight rows usually represent neurons in the layer. Each output row contains one result per neuron.
How to Use
- Enter one input vector or several sample rows.
- Enter matching weights for every neuron.
- Add one bias or a bias for each neuron.
- Select an activation function and output settings.
- Choose optional normalisation and detail controls.
- Submit the form to view the complete calculation.
Example Data
| Input | Weight | Product |
|---|---|---|
| 0.50 | 0.80 | 0.40 |
| 1.20 | -0.30 | -0.36 |
| 0.70 | 0.50 | 0.35 |
With bias 0.10, the weighted sum equals 0.49. Applying sigmoid produces approximately 0.620106. The threshold can then create a binary prediction.
Frequently Asked Questions
What is a neural network weighted sum?
It is the dot product of inputs and weights. A bias is usually added afterward. This value enters the selected activation function.
Why is a bias included?
Bias shifts the neuron's decision boundary. It lets activation occur without zero-centred inputs. This increases model flexibility during training.
Can weights be negative?
Yes, negative weights reduce the total signal. They often represent inhibitory relationships. Positive weights increase the weighted contribution.
What is pre-activation?
Pre-activation is the weighted sum before activation. It is commonly written as z. The activated output is computed afterward.
How does batch mode work?
Each input line becomes one sample. The same weight matrix processes every sample. Results appear for every sample and neuron.
When should softmax be used?
Softmax is useful for multi-class output layers. It converts logits into relative probabilities. The largest value identifies the predicted class.
What does normalisation change?
L2 normalisation scales a vector to unit length. It preserves direction but changes magnitude. This calculator can normalise inputs or weights.
Why must vector lengths match?
Every input needs one corresponding weight. Different lengths make the dot product undefined. The calculator reports this mismatch immediately.
Can I export the calculation?
Yes, results can be copied or downloaded. CSV preserves the output table. PDF creates a formatted calculation report.