4 ms·
y tho? https://js.tensorflow.org/ https://js.tensorflow.org/
by boltzmannbrain 8y ago
y tho? https://js.tensorflow.org/ https://js.tensorflow.org/
- felipellrocha 8y agoY not tho?
- calibas 8y agoThere's room for more than one, and it's good to have alternatives to Google-run projects.
- hliyan 8y agoI'm aware of tensorflow.js, but what really struck me with brain.js was this snippet from the very beginning of the readme file: how to approximate the XOR function using brain.js const net = new brain.NeuralNetwork(config); net.train([{input: [0, 0], output: [0]}, {input: [0, 1], output: [1]}, {input: [1, 0], output: [1]}, {input: [1, 1], output: [0]}]); const output = net.run([1, 0]); // [0.987] This is how you win over newcomers -- quick, accessible demonstrations of the product/library's capabilities. A sample is worth a thousand words. Tensorflow may have a lot of great, detailed examples, but its documentation fails in this regard.
- spullara 8y agoWhat is the equivalent in tensorflow.js? Can someone translate?
- hombre_fatal 8y agoGreat point. This is why I used p2.js for javascript game physics over franken-emscripten Box2d ports. The readme and source code are extremely accessible (https://github.com/schteppe/p2.js#sample-code https://github.com/schteppe/p2.js#sample-code). When I was trying to optimize my collision detection, I stepped in to p2.js source to read narrowphase vs broadphase implementations. Last I used Box2d, I was reading c++ pdf documentation.
- axel180 8y agoReally cool example!
- bluejay2387 8y agoI share the concern about mono-cultures in tech, but if you are serious about getting into data science or AI I have to agree with the OP -- stick to TensorFlow. TensorFlow.js is not a first class citizen of that ecosystem, but its close enough to get real work done. Also... there are some groups that use Javascript for this kind of work (We use Typescript for our projects), but the vast majority of it is in Python. As much as I dislike that language, it completely dominates AI and data science.
- boltzmannbrain 8y ago> if you are serious about getting into data science or AI Then you won't be using Javascript anyways. Like you said, Python is the way to go: PyTorch, TF, PyMC3, scikit-learn, etc.
- bluejay2387 8y agoThere are several firms that I personally know of that use alternative languages for building production systems around AI. My two largest clients have systems built in Typescript and Java. If you are going to work in this field you have to know Python as it is a common language for practitioners, but the language choice for production systems is driven by many factors. Python is almost never an appropriate choice for building production systems. Even in cases where we use Python for models, the models are exported to a different language for integration with the deployed application. In many cases there are substantial benefits to building models in the language that will used for building the final application as well. As with all technical choices, the needs of the project should be the ultimate basis for making a selection -- not fanboi attachments to particular languages.
- FridgeSeal 8y ago> but the language choice for production systems is driven by many factors. Python is almost never an appropriate choice for building production systems And JS is? Even with TS papering over the top of it, JS is not really an ideal language for this. If you want a type system, performance and ease of use, why not write it in Julia?
- axel180 8y ago1. Tensorflow.js closely (not exactly) mirrors the python counterpart, and its api's, and thinking. We feel it does not reflect node ideologies well. And not the shify, what is in today is out tomorrow, thinking. The thinking that is practical, and applies well to business tastics. Brain.js started in node, and was original in its way it tackled the problem. Being data first, easy api, and then speed. It just works. 2. The vast majority of machine learning needs are encompassed within the library, and are only getting better. 3. The library can be learned in a matter of hours rather than weeks or months. 4. We can do it faster, simpler, than tensorflow.js. GPU support is coming in NodeJS, but is already partially implemented for browser, with fallback to CPU. 5. Brain.js was measured, where its benchmark was even better than industry standards, including IBM's Watson: https://github.com/jesus-seijas-sp/demo-nlp https://github.com/jesus-seijas-sp/demo-nlp (note: project uses brain.js). Tensorflow.js isn't mentioned in this link, but I talked with the author about using Tensorflow.js, which he did try for this exact project, and his exact reply was: "with tensorflow.js same implementation I got a 0.91, but taked more time to train with CPU" (complete with typo) 6. Any corporation as powerful as those who maintain tensorflow should not have all the say in something as powerful as machine learning. Everyone should, and can. 7. We choose to.