CNNs In Browser
Notes on Implementing CNNs In The Browser
Last updated
Was this helpful?
Notes on Implementing CNNs In The Browser
Last updated
Was this helpful?
To implement our CNN based works in the Browser we need to use Tensorflow.JS π
π Import
π·ββοΈ Create models
π©βπ« Train
π©ββοΈ Do inference
We can import Tensorflow.js in the way below
π Same as we did in Python:
π£ Decalre a Sequential object
π©βπ§ Add layers
π Compile the model
π©βπ Train (fit)
π₯ Use the model to predict
([-1.0, 0.0, 1.0, 2.0, 3.0, 4.0], [6, 1])
[-1.0, 0.0, 1.0, 2.0, 3.0, 4.0]
: Data set values
[6, 1]
: Shape of input
πβπ¨ Attention
π’ Training is a long process so that we have to do it in an asynchronous function