Skip to content

Files

mnist-transfer-cnn

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
Mar 30, 2018
Jun 6, 2024
Mar 30, 2018
Mar 21, 2022
Sep 29, 2019
Feb 21, 2019
Jun 10, 2022
Mar 21, 2022
Nov 27, 2018
Apr 12, 2019
Jan 27, 2023

TensorFlow.js Example: MNIST CNN Transfer Learning Demo

This demo shows how to perform transfer learning using the Layers API of TensorFlow.js.

It follows the procedure outlined in the Keras mnist_transfer_cnn example.

  • A simple convnet was trained in Python Keras on only the first 5 digits [0..4] from the MNIST dataset. The resulting model is hosted at a URL and loaded into TensorFlow.js using tf.loadLayersModel().
  • The convolutional layers are frozen, and the dense layers are fine-tuned in the browser to classify the digits [5..9].

To launch the demo, do

yarn
yarn watch

See this example live!