Bundler - ackRow/SlouchyJS GitHub Wiki
To get the project started quickly, each script was loaded in index.html
Bundling and Transpiling
Using proper modules would widely improve the code but some change would have to be done
- For this I'm referring to the TensorFlow JS Website
Add TensorFlow.js to your project using yarn or npm. Note: Because we use ES2017 syntax (such as
import
), this workflow assumes you are using a bundler/transpiler to convert your code to something the browser understands.
Yarn
- Using yarn or npm to install TensorflowJS
$ yarn add @tensorflow/tfjs
- Importing tfjs in javascript file (such as
neural_net.js
)
import * as tf from '@tensorflow/tfjs';