Skip to content

Latest commit

 

History

History

iris

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!