One of the biggest reasons is I think the relatively deep integration of the Python ecosystem with the C ecosystem. While Python itself is not much faster than Javascript, it’s pretty easy to call C-code from python code in a way that allows you to actually write code that’s fast enough for Machine Learning purposes. I don’t think anything similar like this exists in javascript.
TensorFlow.js for Node.js is just a nice way to interface with a native backend, just like the Python library. In the browser they use WASM rather than pure JS for better performance. But you’re right that it’s not quite as easy as Python.
Yeah, sorry, I meant in particular the convenience I’ve seen in the Python world. I know that you can call native code from Node.js, but the whole ecosystem isn’t really set up to do that, and the few times I’ve experimented with it it seemed quite clunky to me, but I really haven’t looked very much, so might totally be wrong. My guess is that the ecosystem is also just a lot younger, so even if you can do these things reliably now, you probably couldn’t a few years ago.
And yeah, using WASM you can get something similar going, though my guess is WASM is still going to be substantially slower than native code, at least for now.
For the same reason Python is really easy to integrate with stuff written in FORTRAN, which is really important for certain kinds of numerical analysis.
One of the biggest reasons is I think the relatively deep integration of the Python ecosystem with the C ecosystem. While Python itself is not much faster than Javascript, it’s pretty easy to call C-code from python code in a way that allows you to actually write code that’s fast enough for Machine Learning purposes. I don’t think anything similar like this exists in javascript.
You can with Node.js, e.g. https://nodejs.org/dist/latest-v12.x/docs/api/n-api.html
TensorFlow.js for Node.js is just a nice way to interface with a native backend, just like the Python library. In the browser they use WASM rather than pure JS for better performance. But you’re right that it’s not quite as easy as Python.
Yeah, sorry, I meant in particular the convenience I’ve seen in the Python world. I know that you can call native code from Node.js, but the whole ecosystem isn’t really set up to do that, and the few times I’ve experimented with it it seemed quite clunky to me, but I really haven’t looked very much, so might totally be wrong. My guess is that the ecosystem is also just a lot younger, so even if you can do these things reliably now, you probably couldn’t a few years ago.
And yeah, using WASM you can get something similar going, though my guess is WASM is still going to be substantially slower than native code, at least for now.
For the same reason Python is really easy to integrate with stuff written in FORTRAN, which is really important for certain kinds of numerical analysis.