Drawing TP-001 · tensorplain 0.1.0 · open source

Simple Tensor

$TENSOR

An image is a block of numbers: height × width × colour. A batch stacks blocks; a video adds frames. Most shape bugs are axes moved in the wrong order. tensorplain says what every reshape does before a single number moves.

View A: one image, H × W × C. View B: a batch of eight, N × H × W × C. Dimensions in values.
A

The pattern bench

Revisions

Give a shape and a pattern. The bench checks that they fit, says every step in plain words, and draws where each axis goes. Nothing is computed on numbers until you ask.

    Axis flow: every input axis, split into its parts, and where each part lands in the output. Lengths on a log scale.

    Trace a value on a small copy (the same pattern on 0, 1, 2, …)

    Input

    Output · pick a cell

    B

    Your image as numbers

    Revisions

    Open any picture (it stays in your browser) or use the test card. It becomes an H × W × 3 tensor of numbers from 0 to 255. Point at it to read the numbers; apply a pattern and see the result as a picture again.

    W = 384H = 288

    Loupe: the numbers under the pointer

    Point at the image (or tap it).

    Apply a pattern to the image

      C

      Detail T: $TENSOR

      Revisions
      T

      Detail T · scale 1:1

      Simple Tensor

      Contract address

      FZu9nxS72VUGqCzdezNbPNfbAduMpnoPfY3dUg8pump

      Measurements · live

      Price
      —
      Market cap
      —
      Volume, 24 h
      —
      Liquidity
      —
      Change, 24 h
      —

      Measuring.

      Supply
      1,000,000,000
      Tax
      0%
      Site
      v1.0
      Viewport: the chart is drawn when it arrives.

      Viewport · $TENSOR · 1-second candlesOpen the chart

      D

      What is this shape?

      Revisions

      A shape with no names: is it channels first or last, a batch or a clip? tensorplain looks for the colour axis (1, 3 or 4 long) and reads the rest around it. It says when it is guessing, and it cannot tell a batch from frames.

      How often the guess is right
      SetShapesRightMisses

      The held-out misses

        E

        Technical note

        Revisions
        TN-001Rev A14 Oct 2026

        It Is Not That Simple: Explaining Tensor Reshapes Before They Run

        The tensorplain contributors · tensorplain 0.1.0, MIT · the guesser's figures are computed on this page; the einops comparison was run when the library was built and ships in check/ to run again

        1Summary

        tensorplain reshapes tensors with einops-style patterns and states, before any data moves, what each pattern does: which axes are split, reduced, repeated, reordered and merged, and how large the result is. On 3,000 random patterns it gave the same shapes and values as the einops package. Its layout guesser named 36 of 40 held-out shapes correctly; every miss was a clip of frames read as a batch.

        2Background

        On 8 October 2026 TechCrunch reported that interview clips of a film actor and director explaining AI had gone viral [2]. In one, he described convolutional networks as precursors to transformers and a tensor as the numerical form of an image, with values for batch number, frame number and the red, green and blue of each pixel, and asked, "It's just that simple, right?"; the article's writer answered that it is not that simple. In another he described fine-tuning open-source models on a dataset he had shot himself [2].

        Not connected. tensorplain, this site and $TENSOR have no connection with that person, his company, TechCrunch or any studio or AI company, and none of them has seen this note. No person is named or shown on the coin.

        3The pattern language

        A pattern names the input axes on the left and the output axes on the right. Parentheses group several elementary axes into one tensor axis, so (h p1) splits height into blocks of p1; () or 1 is an axis of size one; ... stands for any number of axes. Names missing on the right are reduced; names new on the right are repeated. These are the einops conventions [3].

        4Explaining a plan

        Every pattern is first turned into a plan: the size of every elementary axis (at most one unknown per group), the splits, the reductions, the order, the merges. The plan is checked against the shape and stated in words; errors are phrased in the pattern's terms ("axis 2 is 6, which 4 does not divide"). The data moves only after that, by one strided gather. trace inverts the plan for any output position.

        5Checking against einops

        3,000 patterns were generated at random — rearrange, reduce and repeat, one to six named axes, random groupings on both sides, unit axes in 436 and ellipses in 595 — and run through the einops package (version 0.8.2, numpy backend) and through tensorplain on the same 0, 1, 2, … input. All shapes and all values were equal. The first run found an error: a bare ... on the right merged its axes instead of keeping them separate; it was fixed before release and the run was repeated.

        6Guessing layouts

        Table 1. The layout guesser.
        SetShapesRightSaid sureSure and right

        The rules were written against the development shapes; the held-out shapes were written first and scored once. The four misses (…) are clips of frames; a shape cannot tell frames from a batch, and the guesser says so in its answer. With {video: true} all four come out right.

        7Limitations

        Tensors are plain arrays in this page: this is a tool for understanding and for small data, not for training. The guesser knows image and video layouts only, and the same people wrote its rules and both sets of shapes. Patterns are the einops subset most people use; einops' backends, layers and einsum are out of scope.

        8Use

        Explain the pattern, read the result shape, trace one value by hand, then run it. It is rarely just that simple; it can be made plain.

        RReferences

        1. tensorplain 0.1.0, the library on this page (MIT).
        2. S. Perez, TechCrunch, 8 October 2026: interview clips of a film actor and director explaining AI go viral. techcrunch.com
        3. A. Rogozhnikov, "Einops: Clear and Reliable Tensor Manipulations with Einstein-like Notation", ICLR 2022.
        F

        Parts list

        Revisions

        tensorplain 0.1.0: one file, no dependencies, Node 18 and later and every modern browser. MIT licence. Every file of the repository is an item on the list, with its SHA-256.

        The repository
        ItemPartLinesSHA-256

        Downloads

        Assembly: quick start

        const T = require("./tensorplain.js");
        T.explain("b c h w -> b h w c", [8, 3, 224, 224]).steps;
        T.rearrange(T.arange([2, 3]), "h w -> w h");
        T.reduce(img, "(h 2) (w 2) c -> h w c", "mean");
        T.guessLayout([16, 3, 224, 224]).layout;   // "N C H W"
        node bin/tensorplain.js explain "h w c -> c h w" --shape 480,640,3
        node bin/tensorplain.js guess 2,16,3,112,112
        npm test

        Interfaces: the API

        tensorplain functions