-
How to Generate Model Files of tfjs (inclubing Structure and Weights) ?
- Need to install python library
tensorflowjsfirst.
pip install tensorflowjs
- Then convert models from Keras to Tensorflow.js (refer to here)
- Need to install python library
-
How to Utilize these Model Files?
- Publish Model Files to Web and get the Link of
model.json. For this case, the URL is : http://mobilenet.purelyvivid_tfjs.nctu.me/tfjs_mobilenet/model.json - Download https://github.com/tensorflow/tfjs-examples . In the folder of
/mobilenet, open the file namedindex.js. Modify theconst MOBILENET_MODEL_PATH = ...to the URL of your model.
-
Confirm your Environment: (could refer to here if your OS is Ubuntu)
Node.js >=8.9 and <9
Yarn
-
Run JS code
yarn yarn watch - Publish Model Files to Web and get the Link of
purelyvivid/tfjs_model
Folders and files
| Name | Name | Last commit date | ||
|---|---|---|---|---|

