const model = tf.sequential();
model.add(tf.layers.dense({units: 1, inputShape: [1]}));
// set compiling parameters and compile the model
model.compile({loss:'meanSquaredError',
// get summary of the mdoel
// create sample data set
const xs = tf.tensor2d([-1.0, 0.0, 1.0, 2.0, 3.0, 4.0], [6, 1]);
const ys = tf.tensor2d([-3.0, -1.0, 2.0, 3.0, 5.0, 7.0], [6, 1]);
doTraining(model).then(() => {
predict = model.predict(tf.tensor2d([10], [1,1]));