Install:
npm install
Train:
npm run train
Predict:
npm run predict photos/flower_photos/daisy/5794839_200acd910c_n.jpg
Quantization (Compression):
tensorflowjs_converter --quantize_float16 --input_format tfjs_layers_model --output_format=tfjs_layers_model flower-model/model.json quantized-flower-model/
Graph model (Performance optimization):
tensorflowjs_converter --quantize_float16 --input_format tfjs_layers_model --output_format=tfjs_graph_model flower-model/model.json quantized-graph-flower-model/
https://research.google/pubs/pub48051/
sources: