9 ms·
Brain.js
- berdon 8y agoSaw this and thought, "Huh, I wonder if harthur is back at it", but nope. Nice to see someone picked it up though!
- franciscop 8y agoI followed the progress back then and felt very bad for both, that such an awesome library was going down and the bad situation she found herself into. Hope she is doing well! And happy to see brain being reborn.
- jtloong 8y agoI think she followed up a few years later and said that the bad situation she was in was unrelated to her leaving Github. It was mostly the time commitment of maintaining many open source projects.
- hliyan 8y agoWhat happened to the author? I'm not aware of the history...
- axel180 8y agoWhat happened was essentially bullies. I think it is apparent now that the library and, more importantly, the idea of a data first neural network architecture in javascript isn't going away.
- spiffytech 8y agoWhat do you mean by "data-first"? What other forms could a JS NN architecture take?
- axel180 8y agoA lot of neural networks start by first constructing the neural network structure, and eventually getting around to running the data through it. Where in brain.js, line 2 in most examples (just after instantiation) is train with data.
- portmanteaufu 8y agoFrom the README: brain.js is a library of Neural Networks written in JavaScript.
- hombre_fatal 8y agoA 19-part interactive neural network course that uses brain.js was posted to HN last week: https://scrimba.com/g/gneuralnetworks https://scrimba.com/g/gneuralnetworks
- Etheryte 8y agoEven as someone who has only superficial knowledge of the topic, that course was very underwhelming.
- sickcodebruh 8y agoAs someone with absolutely no knowledge of the topic, I found that course to be very digestible and pleasant.
- deleted 8y ago[deleted]
- hombre_fatal 8y agoSame. It was so accessible (voiceover in an online code editor) that I just did it instead of bookmarking it for a day that never arrives.
- axel180 8y agoThat is really cool to hear!
- axel180 8y agoTy, I hope my voice is/was not very irritating. I obsess over relaying ideas in a _very simple_ manner. Things should be as simple as possible, but not simpler...
- axel180 8y agoTy for your thought. I'd love to know more specifics.
- boltzmannbrain 8y agoy 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.
- danielmorozoff 8y agoCan someone comment on performance -- speed vs training vs other frameworks. Most of our work is in TF/Pytorch and I have not used any JS implementations would love to hear some peoples insights into how it compares.
- vorticalbox 8y agoI just did the maths one. 1 to 10 addition, 2000 iterations took about 5 mins on repl.it It got the maths wrong so will need more training
- shados 8y agoThe sample app (the color contrast stuff) hurt my feelings a bit. I used to work on an app that needed to do something similar and I ended up fighting with the YIQ formula (it really doesn't work for a lot of cases). Playing with the sample just a bit and I ended up replicating what had taken me weeks to do back in the days...
- axel180 8y agoThis was good, correct? I'd love to hear what your use case was, like which colors didn't work, etc.
- shados 8y agoHaha, sorry if it was unclear, my tone was in jest. Yeah, basically what Im trying to say is that this is awesome. It was several years ago so I don't have my old code anymore (different job), but it was in the printing industry, where we wanted to warn customers that their choices of color were...dubious. However, it's extremely subjective. An example is certain shades of red/orange. The formula might tell you that using white text is a bad idea, but they're really the same to read, and white looks better. One thing I'd have to play around more than my free time allows, but I had to deal with back then, was backgrounds with multiple color. Where it got really tricky is when the text overlaps multiple colors, you have to decide if you're seeing enough of the text that one foreground color is ok, or if it's too much and you have to say "no". It was incredibly tricky to do, especially with things like antialiasing involved. Training a model with that data probably would give much better results than my tweaked formulas of old.
- revskill 8y agoJS nails it again even with Neuron Networks. What saddens me in latest years is the direction of library development, where people put more focus on Python instead of Javascript. Javascript is universal, you can reuse your code in both browser, native apps and server. Python ? I don't think so. My dream of "getting the job done" is a universal language, universal ecosystem/libraries. We need universal developers, no need for full-stack developers anymore.
- h8hawk 8y agoYeah! Making poorly designed and "weakly" typed language with enormous WTF's as a universal language! I think if they put more effort on webassembly, market share and library support for js will have a huge dropout. For more universal language how about have a actual sane language other than javascript or even python?
- vorticalbox 8y agoType script is what will likely take over.
- irascible 8y agoWholeheartedly concur with this. As a career programmer of 25 years, using most modern languages including python in both personal and professional work. This reminds me of how academia used to promote Pascal in schools when the community and industry had clearly embraced C and then C++ as the dominant compiled language.
- noobiemcfoob 8y agoI am a full stack developer using python for everything but what's in my HTML pages. And I'd replace that javascript with python as soon as it would be viable. Javascript is fine for what it is, but the idea of it as a universal language is gross.
- revskill 8y agoGood luck porting your Python code into other environments in case you need to.
- quu 8y agoGreat. From this source code, I can find well that the speed is optimized even simple for-loop levels in JavaScript.