Neural Network Activation, Softmax and Layer Calculator

Choose a tool, enter logits or values, or layer sizes, kernel, stride and padding, and see probabilities, activations, output shapes, parameters and scaled values.

Runs in your browser. Your files never leave your device. See how to check

…

How to do it

  1. 1
    Choose the tool

    Softmax, activations, conv, params or scaling.

  2. 2
    Enter values

    Logits or numbers.

  3. 3
    Enter layer settings

    Kernel, stride, padding.

  4. 4
    Read results

    Tables and shapes.

  5. 5
    Copy

    Into notes or code.

About this tool

Many small calculations come up when designing or debugging a neural network. What probabilities does softmax give for these logits, and how does temperature change them? What does each activation function return for a value? What shape comes out of a convolution with this kernel, stride and padding, and how many parameters does a layer have? How do min-max scaling and standardisation transform features? This calculator answers all of them in one place, with tables you can copy into notes or code comments.

Who this is for

Students learning deep learning, engineers debugging models, and anyone tuning sampling temperature for a language model.

Softmax and temperature

softmax(xᵢ) = e^(xᵢ/T) / Σ e^(xⱼ/T). Temperature T below 1 sharpens the distribution toward the top logit; above 1 flattens it. The table compares T = 1, your T, 0.5 and 2, and the entropy in bits shows how uncertain the distribution is.

Activations

Sigmoid 1 / (1 + e^(−x)) maps to 0 to 1; tanh to −1 to 1; ReLU max(0, x); Leaky ReLU keeps a small slope α for negatives; GELU, used in transformers, is approximated by 0.5x(1 + tanh(√(2/π)(x + 0.044715x³))).

Convolution output size

Output = floor((W + 2P − K) / S) + 1 for input width W, kernel K, padding P and stride S. A 224-pixel image with a 3×3 kernel, stride 2 and padding 1 gives 112 × 112. Parameters = (K × K × C_in + 1) × C_out; multiply-adds = output area × K² × C_in × C_out.

Dense layers

A fully connected layer from n to m units has (n + 1) × m parameters including biases. A 784-256-128-10 network has 235,146 parameters, about 0.94 MB at 32-bit.

Scaling and norms

Min-max scaling maps values to a chosen range; z-scores subtract the mean and divide by the standard deviation. L1 and L2 norms are used in regularisation.

Dropout

During training, dropout zeroes units with probability p and scales the rest by 1 / (1 − p), so expected outputs match inference.

A worked example

Logits 2.0, 1.0, 0.1 and −1.2 give softmax probabilities 0.64, 0.24, 0.10 and 0.03 at T = 1; at T = 0.5 the top probability rises to 0.86.

## Debugging shapes Shape mismatches are one of the most common errors when building models. Work through each layer here, writing down the output height, width and channels, and compare with what your framework prints. Odd input sizes with stride 2 lose a pixel through rounding, which often explains a mismatch after several downsampling steps.

Memory per layer

Parameter memory is only part of the story: training also stores activations for every layer and optimiser state, often two to four times the parameter memory with Adam.

Limits

Framework details such as dilation, groups and rounding modes can change shapes; check the documentation. This is general information, not a substitute for testing your model.

Worked example

Logits 2, 1, 0.1, −1.2 give a top softmax probability of 64%.

Quick facts

Frequently asked questions

What does temperature do?

Below 1 it sharpens probabilities; above 1 it flattens them.

How do I compute convolution output size?

floor((W + 2P − K) / S) + 1.

How many parameters in a dense layer?

(inputs + 1) × outputs.

What is GELU?

A smooth activation used in transformers.

Why scale by 1/(1 − p) with dropout?

To keep expected activations the same at inference.

Is my data stored?

No. It stays in your browser.

Guides for this tool

Completely freeNo cost, no sign-up
Files stay privateEverything runs in your browser
Easy in your languageAvailable in many languages