Training Fashion MNIST dataset on browser using tensorflowjs and visualizing model training using tfvisualizer js library.
Even though training occurs on static html files, tfjs libraries requires a server for serving the files. On website server is provied by hosting provider.
Running file locally is also easy, as we need a server. There are many ways to serve http files like WAMP for windows or LAMP for linux, or chrome web http extension.
The simplest way to serve these file is by running one line python command inside folder containg files.
- Python http module is built in so there is no need of installing additional package. Plus it is most simple way of serving static pages locally.
python3 -m http.server
The above command will give following output:
Serving HTTP on 0.0.0.0 port 8000 (http://0.0.0.0:8000/) ...
Open browser and open url: http://0.0.0.0:8000
This will open html file and start loading the tfjs.