Index

Free, with Google

Keep going, free.

A free account opens lessons 2 and 3 of every track, 33 more lessons, and keeps your progress and review cards on every device.

Start free with Google

A chalk plan

Open everything on chalk.

Every lesson, board, video, lab and paper, and the full review decks. Yearly is $39/year.

See plansStart free instead

Module 03 · AI · Past the basics · about 18 min to read

Watch: CNNs: how a machine learned to see
▶ VideoPlay it as a journeyTutor comes with a plan

Borrowed eyes: transfer learning, autoencoders, VAEs and GANs

Teaching It To See
Teaching It To See · Open board

The board that draws a photograph as a grid of pixels. This lesson starts from what a network learns to see in that grid, then asks how to reuse it, squeeze it, and make new pictures from it.

A small hospital in Pune has 300 chest X-rays, each marked healthy or not by a doctor. A network like the one in the last lesson needs millions of photos to learn what an edge, a texture and a shape are. With 300, it memorises them and fails on the next patient. The hospital cannot buy more labelled X-rays this year. It has one cheap way out: use a network that already learned to see on someone else’s millions of photos.

By the end you will be able to reuse a trained network on a small dataset, explain how an autoencoder squeezes data and why a VAE or a GAN can make new data from the squeeze, and say what each one gets wrong.

The history (optional)

In July 2006 Geoffrey Hinton and Ruslan Salakhutdinov published “Reducing the dimensionality of data with neural networks” in Science. They showed that a network trained to rebuild its own input through a narrow middle gives short codes that beat the older method, principal components analysis. In December 2013 Diederik Kingma and Max Welling put the first version of “Auto-Encoding Variational Bayes” on arXiv. That is the variational autoencoder. In June 2014 Ian Goodfellow and seven co-authors submitted “Generative Adversarial Nets” to arXiv, and the paper went to NeurIPS that year. Also in 2014, Jason Yosinski, Jeff Clune, Yoshua Bengio and Hod Lipson published “How transferable are features in deep neural networks?” It measured, layer by layer, how much of a trained image network can be reused. Nothing later in this lesson depends on these dates.

Before you start. From Convolutional Networks: a kernel is a small grid of weights slid across an image, and stacked layers learn edges first, then textures, then parts, then whole objects. From What a Neural Network Is: a network is layers of weighted sums, and all its weights together are its parameters. From How It Learns (loss, gradient descent, backprop): training nudges every weight to shrink an error score, called the loss, and a network with too many weights for too few examples memorises them. From Fine-tuning & Alignment: you can freeze weights, meaning you keep them fixed and train only the rest.

Lesson 29 of 83 in AI

The rest of this lesson is part of a plan.

A plan opens every lesson, board, video, lab and paper on chalk. Yearly is $39/year.

See plansAlready a member? Sign in

Or start free: a free account opens lessons 2 and 3 of every track.

In this lesson

  • Transfer learning: keep the early layers, replace the end
  • Autoencoder: rebuild the input through a narrow middle
  • A plain autoencoder cannot make new things
  • VAE: make each code a small cloud
  • GAN: a forger and a judge
  • Transfer: how many layers to keep
  • Autoencoder: the bottleneck is the regulariser
  • VAE: the loss, and why the pictures blur
  • GAN: why training is hard
  • The code

Terms it explains: transfer learning, pretrained, head, fine-tuning, autoencoder, encoder, latent code, decoder, variational autoencoder, VAE, reparameterization, KL divergence, generator, discriminator, generative adversarial network, GAN, Common mistakes, 2 + sigma.

Related paper

Review AI