Skip to content

Files

iris

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
Mar 30, 2018
Feb 21, 2019
Mar 30, 2018
Jan 7, 2019
Mar 21, 2022
Mar 13, 2019
Feb 21, 2019
Jun 10, 2022
Mar 21, 2022
Nov 20, 2018
Apr 7, 2023

TensorFlow.js Example: Iris Classification

This demo shows how to perform classification on the classic Iris flower data set using the Layers API of TensorFlow.js.

It demonstrates ways to create a model:

  • Loading a pretrained model hosted at a URL, using tf.loadLayersModel()
  • Creating and training a model from scratch in the browser.

This demo also shows how to use the callbacks field of the Model.fit() configuration to perform real-time visualization of training progress.

The model consists of two Dense layers: one with a relu activation followed by another with a softmax activation.

To launch the demo, do

yarn
yarn watch

See this example live!