The 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.
Training a model in the browser is the least practical use for tensorflow.js IMO (unless maybe you want to hijack people's browsers to help with training or something).
> Training a model in the browser is the least practical use for tensorflow.js
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)
A lot of problems boil down to optimizing a cost function. This function could be the error in recognizing cat pictures or the likelihood of recommending a movie to a user.
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.
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 of a cat and a dog so that it can
can generalize and categorize general images of cats and dogs. A bad fit would be if the network just memorized the example images.
It's a high-performance-computing framework that allows you to specify matrix and vector math expressions in terms of a graph structure. In exchange, you get automatic derivative calculation, and a somewhat easier ability to distribute complicated calculations across processors.
HN people are mainly interested in it because it's one of the major frameworks for creating neural networks. Also because Google.
The framework is written in C++ but has decent bindings to Python, and is popular in both languages. Aside from wanting to use Javascript, there are no good technical reasons to do any of this stuff in Javascript.
Is there a TF/Keras in Python to JavaScript transpiler somewhere? I don't want to waste time retyping complex methods to JS. Thanks for any suggestion!
[+] [-] zawerf|7 years ago|reply
https://js.tensorflow.org/tutorials/import-keras.html
Training a model in the browser is the least practical use for tensorflow.js IMO (unless maybe you want to hijack people's browsers to help with training or something).
[+] [-] rasmi|7 years ago|reply
https://ml5js.org/docs/quick-start
[+] [-] jorgemf|7 years ago|reply
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)
[+] [-] asual|7 years ago|reply
[+] [-] plurgid|7 years ago|reply
[+] [-] augbog|7 years ago|reply
[+] [-] galfarragem|7 years ago|reply
[+] [-] quadrature|7 years ago|reply
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.
[1] https://www.tensorflow.org/api_guides/python/math_ops
[+] [-] s-macke|7 years ago|reply
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 of a cat and a dog so that it can can generalize and categorize general images of cats and dogs. A bad fit would be if the network just memorized the example images.
[+] [-] timr|7 years ago|reply
HN people are mainly interested in it because it's one of the major frameworks for creating neural networks. Also because Google.
The framework is written in C++ but has decent bindings to Python, and is popular in both languages. Aside from wanting to use Javascript, there are no good technical reasons to do any of this stuff in Javascript.
[+] [-] bitL|7 years ago|reply
[+] [-] halflings|7 years ago|reply
Guide here:
https://js.tensorflow.org/tutorials/import-keras.html
[+] [-] Micoloth|7 years ago|reply
I think your step 4 code is messed up though?
[+] [-] jaya-yellowant|7 years ago|reply
[+] [-] burkel24|7 years ago|reply
Joking aside this is super cool
[+] [-] gaius|7 years ago|reply