Convolutional Neural Network Training for MNIST Digits Classification using WgPy

This demo trains a convolutional neural network to classify MNIST digits dataset. The computation is performed in the web browser using GPU (WebGPU / WebGL), with training-loop implementation by Python.

Training metrics

Iterations Training loss Test loss Test accuracy
- - - -

Test results

Input
Prediction - - - - - - - - - -
Details
This demo runs a training loop provided by Chainer library, which is a deep learning framework in Python. Chainer uses CuPy library to perform computation on GPU on desktop environment, and in this demo it is replaced by WgPy, a library to use GPU inside web browsers. This demo uses MNIST dataset by Yann LeCun. Training samples are reduced to 5000 samples for reducing network bandwidth.
Options (must be set before clicking "Run"):
Backends to try:

If both are checked, WebGPU is first tried. If the browser does not support it, WebGL is tried.

Model:
Batch size:
View source code About WgPy