Re:Tensorflow.js: Machine Learning in JavaScript
by revskill on Monday June 08, 2020 @02:58AM
(#23454229)
Do you know how to consume model produced by python using tensorflow.js ?
[ Parent
| on HN ]
Re:Tensorflow.js: Machine Learning in JavaScript
by ml_basics on Monday June 08, 2020 @03:28AM
(#23454388)
I played around with tf.js a few weeks ago and learning to use python-trained models was the first hurdle. I made a minimal working example of this here, feel free to check it out:
https://github.com/paruby/mnist
See model/mnist_js.ipynb to see how the model is trained and exported to a js readable format, and you can see in lines 13-15 in index.html how the model is loaded.
Note: I have a decent amount of ML experience but almost no javascript experience, so YMMV
Re:Tensorflow.js: Machine Learning in JavaScript
by johnx123-up on Monday June 08, 2020 @01:14PM
(#23458464)
TF Lite to TFJS might be a good option. But, this ticket is pending for a long time https://github.com/tensorflow/tfjs/issues/991 Do you have any solution for this?
Re:Tensorflow.js: Machine Learning in JavaScript
by jaster on Monday June 08, 2020 @03:29AM
(#23454393)
there is a specific tool to convert from various formats to a tensorflow.js model:
https://github.com/tensorflow/tfjs/tree/master/tfjs-converte...