Noob question: Can anybody tell in a few sentences of plain english what is tensorflow, how it works and why seems to be so relevant?
Tensorflow tries to fit the free parameters (usually millions of parameters) of a function y=f(x). The fitting algorithm gets usually thousands or millions of examples of how the output y for a given input x has to look like. For example, x can be tens of thousands of images of cats and dogs, and y can be 1 for a dog and 0 for a cat. The goal for the fitting algorithm is to find parameters that describe the concept o…
Tensorflow.js – A Practical Guide
11–20 of 37 posts
Re: Tensorflow.js – A Practical Guide
#12Earlier quoted context omitted.
There are many reasons to do it in JavaScript: - Many companies and projects have their entire server-side stack in JavaScript and Node.js, and often they want to simply make a prediction through a model. It's quite a lot to ask them to pull in a python runtime just to make a prediction. TensorFlow.js with node bindings to TensorFlow C enables this type of inference with minimal overhead. - Privacy. You can make pred…
There's literally only one reason to do it in Javascript: you want to use Javascript. There are dozens of reasons why it's a terrible idea: unfortunate memory consumption, abysmal performance, poor abstractions, bad library support, and so on. Tensorflow in Python isn't exactly a stellar choice for performance, but at least you gain flexibility and nice abstractions and good high-performance math/stats library suppor…
Yup, which is a perfectly valid reason.
> If calling out to a binary is a security problem for you
You miss the point. The security problem is sending the raw data from the client to the server.
> So again, this boils down to "I don't want to use Python and I'd prefer to use JS instead."
Which once again, is a perfectly valid reason
> Servers are expensive so hosting static weights on a server is cheaper?
No, CPU/GPU intensive tasks on a server is expensive but storing a few static weights is cheap.
Re: Tensorflow.js – A Practical Guide
#13Earlier quoted context omitted.
There are many reasons to do it in JavaScript: - Many companies and projects have their entire server-side stack in JavaScript and Node.js, and often they want to simply make a prediction through a model. It's quite a lot to ask them to pull in a python runtime just to make a prediction. TensorFlow.js with node bindings to TensorFlow C enables this type of inference with minimal overhead. - Privacy. You can make pred…
There's literally only one reason to do it in Javascript: you want to use Javascript. There are dozens of reasons why it's a terrible idea: unfortunate memory consumption, abysmal performance, poor abstractions, bad library support, and so on. Tensorflow in Python isn't exactly a stellar choice for performance, but at least you gain flexibility and nice abstractions and good high-performance math/stats library suppor…
Also he isn't contradicting himself, serving static data off a CDN or server is a lot easier and a lot less expensive than having a cluster setup to do inference.
Re: Tensorflow.js – A Practical Guide
#14Earlier quoted context omitted.
There's literally only one reason to do it in Javascript: you want to use Javascript. There are dozens of reasons why it's a terrible idea: unfortunate memory consumption, abysmal performance, poor abstractions, bad library support, and so on. Tensorflow in Python isn't exactly a stellar choice for performance, but at least you gain flexibility and nice abstractions and good high-performance math/stats library suppor…
> So this is "we don't want to use another language". Yup, which is a perfectly valid reason. > If calling out to a binary is a security problem for you You miss the point. The security problem is sending the raw data from the client to the server. > So again, this boils down to "I don't want to use Python and I'd prefer to use JS instead." Which once again, is a perfectly valid reason > Servers are expensive so host…
So don't do that. If you can run tensorflow on your device, you can call out to a local process.
If you want to use JS to do everything, fine. But that's not a good reason. It's just a reason.
Re: Tensorflow.js – A Practical Guide
#15You were so busy figuring out if you could, you didn't stop to wonder if you should… Joking aside this is super cool
Re: Tensorflow.js – A Practical Guide
#16The most practical use not mentioned here is probably to import existing trained models/weights. I can see it being useful for anything that you want to run in real-time (e.g., webcams apps like https://github.com/ModelDepot/tfjs-yolo-tiny ) and can't pay a round-trip cost to server. https://js.tensorflow.org/tutorials/import-keras.html Training a model in the browser is the least practical use for tensorflow.js IMO…
Unless you want to do some type of federated training in real time without sending private information to the servers (very unusual case in my opinion)
Re: Tensorflow.js – A Practical Guide
#17Noob question: Can anybody tell in a few sentences of plain english what is tensorflow, how it works and why seems to be so relevant?
Tensorflow tries to fit the free parameters (usually millions of parameters) of a function y=f(x). The fitting algorithm gets usually thousands or millions of examples of how the output y for a given input x has to look like. For example, x can be tens of thousands of images of cats and dogs, and y can be 1 for a dog and 0 for a cat. The goal for the fitting algorithm is to find parameters that describe the concept o…
- Tensorflow is the best tool to make the grunt work necessary to calibrate the parameters of fitting algorithms.
- Models of fitting algorithms are human proposed and where the ML 'art' is. Seems to be kind of reverse engineering.
Re: Tensorflow.js – A Practical Guide
#18Noob question: Can anybody tell in a few sentences of plain english what is tensorflow, how it works and why seems to be so relevant?
What people want is an easy way to express these functions so that a computer can optimize it for them. Tensorflow allows people to do just that, it lets you represent your mathematical equation in a way that can be analyzed and optimized by a computer.
It does it by exposing various mathematical operations that it understands[1]. As long as you can express your mathematical function using these operations then Tensorflow knows how to compute it efficiently and you can use its optimizer to find the optimal inputs.
comes in handy for a lot of problems.
Re: Tensorflow.js – A Practical Guide
#19Re: Tensorflow.js – A Practical Guide
#20Earlier quoted context omitted.
Tensorflow tries to fit the free parameters (usually millions of parameters) of a function y=f(x). The fitting algorithm gets usually thousands or millions of examples of how the output y for a given input x has to look like. For example, x can be tens of thousands of images of cats and dogs, and y can be 1 for a dog and 0 for a cat. The goal for the fitting algorithm is to find parameters that describe the concept o…
If I understand it correctly: - Tensorflow is the best tool to make the grunt work necessary to calibrate the parameters of fitting algorithms. - Models of fitting algorithms are human proposed and where the ML 'art' is. Seems to be kind of reverse engineering.
It is one of many competing tools, which is “best” depends ironically on many variables. CNTK is a rival for example.