tools

Tensor Shape Calculator

Build a CNN layer stack and get each layer's output shape, parameter count and MACs.

[loading tool…]

How it works

For each spatial axis:

H_{out} = \left\lfloor \frac{H_{in} + 2p - d\,(k - 1) - 1}{s} \right\rfloor + 1

with kernel k, stride s, padding p and dilation d. same padding (TensorFlow/Keras) gives ceil(H_in / s); valid means p = 0.

Layer Parameters MACs
Conv2D k² × C_in × F (+ F bias) H_out × W_out × F × k² × C_in
DepthwiseConv2D k² × C × m (+ C × m bias) H_out × W_out × C × m × k²
Dense N × U (+ U bias) N × U
Pooling, Flatten 0 0 (counted as negligible)

One MAC (multiply-accumulate) is two FLOPs. A depthwise + 1×1 pointwise pair (MobileNet) costs roughly k² + C_out times fewer MACs than one standard convolution: that is why it dominates MCU vision models.

Defaults

The starting stack is a small MobileNet-style classifier on a 96×96×3 input, the size used by common person-detection demos on STM32 and ESP32. The stack is saved in the URL, so you can share a design.

References

esc
All tools
ADC / DAC Resolution Calculator[embedded]
Base64 Encoder / Decoder[dev]
Battery Runtime Calculator[hardware]
Chmod Calculator[dev]
CRC Calculator[embedded]
Cron Expression Builder[dev]
CSV ⇄ JSON Converter[dev]
Duty-Cycle Battery Life[embedded]
Generator Wattage Calculator[hardware]
Hash Generator[dev]
HTML Entity Encoder[dev]
JSON Formatter & Validator[dev]
JSONPath Tester[dev]
JWT Decoder[dev]
LED Resistor Calculator[embedded]
LLM Memory / VRAM Estimator[ai]
Lorem Ipsum Generator[text]
Markdown Preview[text]
Markdown Table Generator[text]
Number & Float Inspector[embedded]
Number to Words[text]
Ohm's Law Calculator[embedded]
Password Generator[dev]
Quantization Size Calculator[ai]
RC / LC Filter Calculator[embedded]
Regex Tester[dev]
Register / Bitfield Viewer[embedded]
Resistor Color Code[embedded]
Roman Numeral Converter[text]
Solar Battery Bank Sizing[hardware]
Solar Panel Output[hardware]
SQL Formatter[dev]
Subnet / CIDR Calculator[dev]
Tensor Shape Calculator[ai]
Timer / PWM Calculator[embedded]
UART Baud Rate Error[embedded]
Unix Timestamp Converter[dev]
UPS Runtime Calculator[hardware]
URL Encoder & Parser[dev]
UUID Generator & Inspector[dev]
Voltage Divider Calculator[embedded]
Voltage Drop Calculator[hardware]
Wire Size Calculator[hardware]
XML Formatter[dev]
YAML Validator & Converter[dev]
Commands
Toggle theme (auto → light → dark)
Copy link to this page
Go to all tools
Lire en français
↑↓ move↵ open⌘↵ new tab