By Jamal Hussein · Last updated:
These deep learning calculators answer the practical questions that come up while building and training a neural network: what shape a layer outputs, how many parameters a model has, whether it fits in GPU memory, how many steps a run takes and what the learning rate and loss are doing. Each tool shows the formula with your numbers in it and the PyTorch code that gives the same result.
Which calculator do you need?
The tools follow the order in which the questions usually arise, from designing the network to reading its loss.
| Stage | Your question | Calculator |
|---|---|---|
| Design | What shape comes out of this convolution or pooling layer? | Conv2d output size calculator |
| Design | How many parameters does my model have, and how big is the file? | Neural network parameter calculator |
| Hardware | Will this language model fit on my GPU? | LLM VRAM calculator |
| Budget | What will these prompts cost through an API? | LLM token cost calculator |
| Training | How many steps is an epoch, and how long is the whole run? | Training steps calculator |
| Training | What is the learning rate at step t under warmup and decay? | Learning rate schedule calculator |
| Output | How do raw scores become class probabilities? | Softmax calculator |
| Output | What does the logistic function return for this input? | Sigmoid calculator |
| Loss | What loss does this prediction earn? | Cross-entropy loss calculator |
Designing the network: shapes and parameters
Most errors in a first model are shape errors. A convolution with a 3 by 3 kernel, stride 2 and padding 1 halves each spatial dimension; change the padding and the next layer no longer lines up. Working the output shape out before running the code, layer by layer, is quicker than reading a stack trace. Once the shapes are fixed, the parameter count follows from them, and with it the size of the saved model.
Parameters are not spread evenly. Fully connected layers and embedding tables usually hold most of them, while convolutions are cheap because one small kernel is reused across the whole image. Seeing the count per layer shows where a model can be made smaller.
Fitting the model on hardware, or paying for it by the token
A model’s weights take parameters times bytes per parameter, so halving the precision halves that part of the memory. For language models that is not the whole bill: the key-value cache grows with context length and with the number of sequences processed at once. The VRAM calculator keeps the two apart so you can see which one is the constraint.
If you call a hosted model instead, the cost is counted in tokens, with input and output priced separately. The token cost calculator turns a request size and your provider’s prices into a cost per request, per day and per month.
Planning the training run
Learning-rate schedules and warmup are specified in optimizer steps, so the total number of steps has to be known before training starts. It depends on the dataset size, the batch size, the number of epochs and any gradient accumulation. With that total in hand, the schedule calculator draws the learning rate over the whole run and reports its value at any step.
Reading the output and the loss
A classifier’s last layer produces raw scores. Softmax turns them into probabilities that sum to one, and cross-entropy measures how much probability the model gave to the correct class. A useful reference point: a model that guesses uniformly over K classes has a loss of ln K, so a loss above that on a balanced problem means the model is doing worse than chance.
When training is finished, the model evaluation calculators cover precision, recall, F1 and ROC AUC. The matrix operations underneath every layer are in the linear algebra calculators.
Frequently asked questions
Do the results match PyTorch?
The formulas are the ones documented for the corresponding PyTorch layers and functions, and each calculator page includes code you can run to confirm the result. Where frameworks differ, for example the bias terms in an LSTM, the page says so and lets you choose.
Are the memory and cost figures exact?
No. The VRAM and token cost calculators are estimators. Real memory use depends on the runtime and real token counts depend on the model’s tokenizer, so treat the results as planning figures and check them against a small real run.
Is anything I enter uploaded?
No. The calculations run in your browser and the numbers you enter are not sent to the site.