why would you do ML in JS?
Neural networks in JavaScript – free 19-part course
41–50 of 74 posts
Re: Neural networks in JavaScript – free 19-part course
#42Earlier quoted context omitted.
One very practical reason is to save on computation costs. GPU servers are not cheap and if you're going to run on CPU anyway, you might as well run it locally on the user's browser. Some demos such as real time object detection isn't possible at all if you had to pay roundtrip server latency (not to mention the complexity of streaming video to and from your server): https://github.com/ModelDepot/tfjs-yolo-tiny And a…
Are you under the impression that js is the only language that can run locally?
Re: Neural networks in JavaScript – free 19-part course
#43Thanks Robert for putting this together. Coming from PyTorch ecosystem. What is the actual requirement for this course? Would a smattering knowledge of ES6 do? Been leching at browser based implementations since Karpathy demoed his CNNs a few years ago but just havent had enough motivation and courage to pickup JS. Perhaps my main reson for anxiety is the confusing JS ecosystem.Also what are some real world use cases…
Re: Neural networks in JavaScript – free 19-part course
#44Re: Neural networks in JavaScript – free 19-part course
#45Is there a Numpy equivalent for JS yet? How easy is it to use (considering that JS doesn't have operator overloading)?
Re: Neural networks in JavaScript – free 19-part course
#46Earlier quoted context omitted.
There is NO save on computation cost. CPU is slow for NN whatever language you are using. OP has a point, if I want to learn PRACTICAL front end programming, I will choose javascript, not Python. Same for Neural networks, just switch the place.
Cost as in money. To deploy a model in js (as a web page) all you need is a static S3 or GCS bucket. You don't even need a webserver and it can automatically handle infinite scale. Show me a python solution that can do the same.
Re: Neural networks in JavaScript – free 19-part course
#47Why the heck Javascript?
One very practical reason is to save on computation costs. GPU servers are not cheap and if you're going to run on CPU anyway, you might as well run it locally on the user's browser. Some demos such as real time object detection isn't possible at all if you had to pay roundtrip server latency (not to mention the complexity of streaming video to and from your server): https://github.com/ModelDepot/tfjs-yolo-tiny And a…
Though if you only meant performing inference in user's browsers, then the challenge would be to find a way for TF/pytorch pre-trained models to port and perform accurately in js. If successfully done, I can see some use cases here.
Re: Neural networks in JavaScript – free 19-part course
#48One complaint... `#` THIS IS NOT AN ASTERISK! (he said it like 5 times in one video)
Otherwise great tutorial
Re: Neural networks in JavaScript – free 19-part course
#49Earlier quoted context omitted.
There is NO save on computation cost. CPU is slow for NN whatever language you are using. OP has a point, if I want to learn PRACTICAL front end programming, I will choose javascript, not Python. Same for Neural networks, just switch the place.
Cost as in money. To deploy a model in js (as a web page) all you need is a static S3 or GCS bucket. You don't even need a webserver and it can automatically handle infinite scale. Show me a python solution that can do the same.
First of all, what you have described is far from the reality.
Had this come true, only inference will be in javascript, through some language agnostic standardized model format, not training. The model is just a blackbox function for the js runtime to call. The amount of javascript to make this happen will be surprisingly slim anyway.