๐Ÿ“ Tensor Broadcasting Visualizer

Watch a small tensor stretch and clone itself to match a bigger tensor's shape โ€” the real rule behind every PyTorch shape mismatch that "just works".

๐Ÿ“‹ How To Use This Lab
  1. Pick a shape for Tensor A (the small one) and Tensor B (the big one) from the dropdowns.
  2. Press ๐Ÿ”€ Broadcast โ–ถ โ†’ Stretchy clones A's cells to fill B's shape, then merges with B, cell by cell.
  3. Watch the result grid build live with real computed sums โ€” every number is actually added, not scripted.
  4. Try an incompatible pair like (2,3) and (4,3) โ†’ see exactly why PyTorch would throw a shape error.
Tensor A Tensor B Result = Stretched A + B Stretchy Press "Broadcast โ–ถ" to begin
๐Ÿค– STRETCHYI'm ready! Pick two shapes and hit Broadcast โ€” I'll clone myself to fit.
๐Ÿง‘โ€๐Ÿซ PROF. TORCHBroadcasting lets PyTorch add tensors of different shapes without a manual reshape โ€” as long as the rule holds.

๐ŸŽ›๏ธ Choose Shapes