-

- -

Friday, April 6, 2018

ObservableHq Tutorial: An Interactive Introduction to TensorFlow.js

 


.

1) Import the TensorFlow.js

2) Import A helper method to show the tensor array

3) Create a model that is used to predict the MNIST dataset. The module constitutes two conv layers two pooling layers and a dense layer. Compile the model using an adam optimizer.

4) Load a pretrained model called mobilenet.

5) Load the image classes.

6) Predict image class.

6.1) Preprocess the image by converting it to a tensor then normalize,

6.2) Predict based on the given model classes

.

https://observablehq.com/@zaidalyafeai/an-intractive-introduction-to-tensorflow-js

.

Alternative:

https://observablehq.com/d/95a9b4e931cccfb0

,