Great article but I have to wonder; why would they build a JS version of Tensorflow? As far as I'm aware most ML is done on-server and while JS is great for building applications, it hardly seems powerful enough to do ML with.
Also saying "Math is not JS's strength' is somewhat of an invalid statement. We shouldn't establish strengths of a language based on popular opinion. We should consider how the interpreters themselves operate with a language. It's possible to find research that shows node.js being considerably faster than python which by pop culture is good with math. In the end if your task is math heavy you will need to adapt the language to your needs and have a strong understanding about how it works. If you do that it won't matter that much which language you'll use to get your results and bring people on the ML band wagon.
I think the JS ecosystem is so big I'd assume it would have a library for everything. Maybe it's not the ideal language for lots of things but these days it's the universal tool.
(Not sure if I'm replying to the intended comment, I'm somewhat confused by the lack of a reply button on certain comments)
It's possible to find research that shows node.js being considerably faster than python which by pop culture is good with math.
This isn't really a fair comparison. Nodejs is a V8-based javascript runtime that does just-in-time compilation and python is just a language. There are Python runtimes that also do just-in-time compilation, so a fair comparison would involve comparable runtimes.
They're planning to have Node support soon so it would be easier to work with GPUs. That's what I heard. Right now, this version is built for running in the browser. 😁
It working on node.js aside (which is on the server), having a JS version lowers the barrier of entry, imo -- spinning up a quick demo just to figure out if you're even interested in this makes it waaaaaay more approachable to ML beginners
Yeah. In our country (Philippines), there are waaaaaayyy more JavaScript developers than Python developers because that's what's taught in school. So introducing this will really make it easier for more developers to get into the ML space. 🎉
+1 this makes it available to a huge audience without them needing to learn a new language and platform at the same time.
ALSO!! With WebAssembly and WebGL, the browser is continuing to become a legitimate platform. It's less and less accurate to think of JS as just an interpreted language, its APIs, optimizations, and tooling are making it a viable target for abstract machine code and even code that runs on a GPU. In that regard, this makes total sense, and as I think about it, I'm surprised it didn't happen sooner!
The reason to bring Tensorflow to the browser is mostly to work with pre trained models. What is CPU intensive is training the model. Anyway you can do both things in JS. But IMO, using JS to train a model is not an efficient approach.
It's a revolutionary development for me because I use JavaScript for everything! 😂
From web, mobile, desktop, even VR -- I use JavaScript to build all of those things.
Now that JavaScript has the powers of TensorFlow.js (which is easier to use than the previous Deeplearn.js), we are now able to bring the power of ML and AI to all of those platforms, effectively democratizing AI. 🎉
I'm Niño Ross Rodriguez, a Senior UX Developer with nine years of industry experience, specializing in developing pixel perfect websites quickly without sacrificing code quality.
Imagine cutting the time to send an image from the browser to the server, make an enquiry, send it back to the browser. the beauty of clientside processing
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Great article but I have to wonder; why would they build a JS version of Tensorflow? As far as I'm aware most ML is done on-server and while JS is great for building applications, it hardly seems powerful enough to do ML with.
Well, why not?
Also they are supporting node.js now
Every language has its strengths. Math is not JS's strength so why use it for something that's inherently math-heavy?
if I'm not mistaken, tensorflow utilizes WebGL to operate on hardware (mainly GPU) so the performance hit by js is not aggressive.
Also, it can be a learning platform for people that are more used to JS, it can start here and move to another language later.
Also saying "Math is not JS's strength' is somewhat of an invalid statement. We shouldn't establish strengths of a language based on popular opinion. We should consider how the interpreters themselves operate with a language. It's possible to find research that shows node.js being considerably faster than python which by pop culture is good with math. In the end if your task is math heavy you will need to adapt the language to your needs and have a strong understanding about how it works. If you do that it won't matter that much which language you'll use to get your results and bring people on the ML band wagon.
Couple of sources:
I think the JS ecosystem is so big I'd assume it would have a library for everything. Maybe it's not the ideal language for lots of things but these days it's the universal tool.
(Not sure if I'm replying to the intended comment, I'm somewhat confused by the lack of a reply button on certain comments)
This isn't really a fair comparison. Nodejs is a V8-based javascript runtime that does just-in-time compilation and python is just a language. There are Python runtimes that also do just-in-time compilation, so a fair comparison would involve comparable runtimes.
They're planning to have Node support soon so it would be easier to work with GPUs. That's what I heard. Right now, this version is built for running in the browser. 😁
It working on node.js aside (which is on the server), having a JS version lowers the barrier of entry, imo -- spinning up a quick demo just to figure out if you're even interested in this makes it waaaaaay more approachable to ML beginners
Yeah. In our country (Philippines), there are waaaaaayyy more JavaScript developers than Python developers because that's what's taught in school. So introducing this will really make it easier for more developers to get into the ML space. 🎉
+1 this makes it available to a huge audience without them needing to learn a new language and platform at the same time.
ALSO!! With WebAssembly and WebGL, the browser is continuing to become a legitimate platform. It's less and less accurate to think of JS as just an interpreted language, its APIs, optimizations, and tooling are making it a viable target for abstract machine code and even code that runs on a GPU. In that regard, this makes total sense, and as I think about it, I'm surprised it didn't happen sooner!
The reason to bring Tensorflow to the browser is mostly to work with pre trained models. What is CPU intensive is training the model. Anyway you can do both things in JS. But IMO, using JS to train a model is not an efficient approach.
It's a revolutionary development for me because I use JavaScript for everything! 😂
From web, mobile, desktop, even VR -- I use JavaScript to build all of those things.
Now that JavaScript has the powers of TensorFlow.js (which is easier to use than the previous Deeplearn.js), we are now able to bring the power of ML and AI to all of those platforms, effectively democratizing AI. 🎉
Atwood’s law 🤗
Imagine cutting the time to send an image from the browser to the server, make an enquiry, send it back to the browser. the beauty of clientside processing