Polyglot Studio
A log of all the coding stuffs
-
-
-
Tuesday, May 25, 2021
TensorFlow.Js Tutorial: Making Predictions from 2D Data
This tutorial is based on the original article at:
https://codelabs.developers.google.com/codelabs/tfjs-training-regression
html
<!-- https://codelabs.developers.google.com/codelabs/tfjs-training-regression/ --> <html> <head> <title>TensorFlow.js Tutorial</title> <!-- Import TensorFlow.js --> <script src="https://cdn.jsdelivr.net/npm/@tensorflow/tfjs@2.0.0/dist/tf.min.js"></script> <!-- Import tfjs-vis --> <script src="https://cdn.jsdelivr.net/npm/@tensorflow/tfjs-vis@1.0.2/dist/tfjs-vis.umd.min.js"></script> </head> <body> <!-- Import the main script file --> <script src="script.js"></script> </body> </html>
javascript
/* 1) Define run() Function */ async function run() { /* 4) Call getData() function */ /* 5) Render Scatterplot Graph */ /* 7) Call createModel() for NN */ /* 9) Call convertToTensor() */ /* 11) Call trainModel() */ /* 13) Call testModel() */ } /* 2) Define eventListener() For run() Function */ document.addEventListener('DOMContentLoaded', run); /* 3) Define getData() function */ /** * Get the car data reduced to just the variables we are interested * and cleaned of missing data. */ async function getData() { } /* 6) Define createModel() function for NN */ function createModel() { } /* 8) Define convertToTensor() */ /** * Convert the input data to tensors that we can use for machine * learning. We will also do the important best practices of _shuffling_ * the data and _normalizing_ the data * MPG on the y-axis. */ function convertToTensor(data) { } /* 10) Define trainModel() */ async function trainModel(model, inputs, labels) { } /* 12) Define testModel() */ function testModel(model, inputData, normalizationData) { }
Newer Posts
Older Posts
Home
Subscribe to:
Posts (Atom)