Train a model in web worker
In this way, we can do long-running computation without actually blocking the UI rendering thread.
Given a string like 3 + 4, it will learn to output a number like 7.
This example generates its own training data programatically.
Click the "Train Model" to start the model training button. You can edit the parameters used to train the model as well.