IntermediateAbout 25 min

    Tiny CNN on Four Shapes

    Read the full article on Substack

    7 min read.

    A small convolutional network, with 188 numbers to learn, trains in your browser on simple 8×8 pictures of four shapes. Small filters slide over each picture and light up where they find a pattern, a pooling step keeps the strongest responses, and a last layer guesses the shape. Step through training to watch the filters change from random to shape detectors and the guesses sharpen, and open the confusion table to see which shapes get mixed up. A link opens Karpathy's ConvNetJS CIFAR-10 demo, which trains on real 32×32 photos from 10 categories.

    test imagehorizontal31%vertical22%diagonal23%blob24%10epoch 0epoch 40loss (0 to 1.5)test accuracy

    epoch 0, loss 1.40, test accuracy 25%

    Before training the network guesses. It sees a diagonal line and gives every class about the same chance. Test accuracy is 25%.

    1/10

    Check your understanding

    Answer from memory before you scroll back up. Pulling an idea out of your head is what makes it stay there.

    Classify a CIFAR-10 image

    Sequence

    Order the network’s path from image to label.

    Tap a piece, then tap where it goes — or drag it. Tap the tray to take one back.

    1. 1Drop a step here
    2. 2Drop a step here
    3. 3Drop a step here
    4. 4Drop a step here
    5. 5Drop a step here
    6. 6Drop a step here
    6 pieces left to place

    Quiz

    20 questions
    Question 1 of 20
    Score: 0

    The CIFAR-10 dataset consists of…

    Done with this lesson?

    Sign in free to keep your progress, streak and quiz scores.

    Keep going