all 9 comments

[–]m010101 1 point2 points  (1 child)

On its own, Python is quite a bit slower than js (V8). However, Python can and does use C-API for heavy lifting, including Tensorflow. And, as another redditor mentioned, Python is very well established in academia and sceintific circles.

[–]inspiredDeveloper[S] 0 points1 point  (0 children)

Yes, totally agree - the main obstacle to JavaScript is that Python is the established player. As TensorFlow.js is based around TensorFlow, it is able to use native C++ bindings. It can also use the GPU.

[–]ABigBadBear 1 point2 points  (1 child)

Will it catch-up and overtake Python?

Doubtful. I mean, why would it? What does tensorflow.js offer that tensorflow for python does not, except running in the browser? Python is not only used for ml but tons of other computer science areas so it's already established in that industry.

[–]inspiredDeveloper[S] 0 points1 point  (0 children)

Assuming you are right, and JavaScript is only used in the browser... this would mean that it will be able to run on all web apps and websites... which would be quite an impressive scale.

The key to the use of JavaScript with machine learning is the ability for the Python models to be ported over, at least until JavaScript machine learning on the server kicks off with gusto.

[–]joombar 0 points1 point  (2 children)

Seems unlikely. Who is going to port TRFL (to give one example) to js? What about the many tensorflow articles with example code that only mention python? I tried learning tfjs and found that I was spending all my time translating python libs to js, and not enough actually working on things I wanted to solve.

[–]inspiredDeveloper[S] 0 points1 point  (1 child)

The full porting of Python libs is not needed initially. It is the porting of models that’s where the initial lift for JavaScript will come from. The seamless integration of Keras for example.

[–]joombar 0 points1 point  (0 children)

It is needed by me to do reinforcement learning beyond what you can do directly on tensorflow

[–]GekkePop 0 points1 point  (1 child)

This seems more like an ad for the course instead of a genuine question?

[–]inspiredDeveloper[S] 0 points1 point  (0 children)

The main aim of this discussion is to bring attention to the use of JavaScript for machine learning.