Live data from Hacker News

Neural networks in JavaScript – free 19-part course

scrimba.com

61–70 of 74 posts

Re: Neural networks in JavaScript – free 19-part course

#61
post #5

Why the heck Javascript?

Personally I've found that Python - or perhaps more Numpy et al - are impenetrable for a learner. I am sure the data structures that are used in Python + Numpy et al are powerful and well-suited for the task, but as a learner coming to this with minimal knowledge trying to ALSO learn the idiosyncrasies and weirdness (IMHO) of how Numpy does things and the weirdness (IMHO) of how Numpy even names things (e.g. in decad…

shape makes sense if you think of arrays in terms of linear algebra concepts(which you should if you're working with ML concepts imo)

Re: Neural networks in JavaScript – free 19-part course

#62
post #50

Earlier quoted context omitted.

in a client's web browser... yeah.

Well there is web assembly, but why is running in a web browser a requirement for creating a neural network anyway?

so you can offset server costs to the client which usually means bloated laggy apps until someone comes along and figures out an optimised way of doing things, for eg react.js vs phonegap's comparative shitshow

Re: Neural networks in JavaScript – free 19-part course

#63

Earlier quoted context omitted.

From the top of my head: - `this` - the whole prototypal inheritance thing - class inheritance bolted on top of prototypal inheritance - arrow functions vs `function` functions

But none of that is going to affect our ability to do machine learning work with JavaScript

doesn't it affect complexity on an exponential scale though? codebases aren't paragons of perfection when even 2 devs are working on them

Re: Neural networks in JavaScript – free 19-part course

#64

I just watched the reinforcement learning video and was very confused -- where did the reinforcement learning happen? I thought reinforcement learning was giving an agent positive / negative signals to learn without example output data, but in the video the network was just retrained with more data? Is it an overloaded term maybe?

Ty for asking this question! "Reinforcement learning" has a wide definition, but in this case because we are using a simple feed forward neural network, "reinforce" is more principled by dynamic programming with supervised learning. We are not actually using a "Deep reinforcement learning" algorithm.

The idea here is that the net can continue to train, reinforcing its previous understanding with new understandings, if new training data is provided.

It may be that we need to clarify the tutorial, as your point is based around unsupervised learning, not having training data.

Is it an overloaded term? YES!

Re: Neural networks in JavaScript – free 19-part course

#65

This seems to exactly follow the examples from the readme. Guessing this is by someone that worked on the project. Either way great tutorial. One complaint... `#` THIS IS NOT AN ASTERISK! (he said it like 5 times in one video) Otherwise great tutorial

Doh! You found a mistake. I'll try and take care of that asap. Ty for pointing this out.

Re: Neural networks in JavaScript – free 19-part course

#66
post #26

Hey guys! I'm the creator of the course and lead developer of brain.js and would love to answer any questions you may have.

Hey Axel! Just started watching but the interactive guide is incredible. It's like having Screenhero with a private tutor. Only thing is, I kind of wish there were something like the time-coded comments SoundCloud has. At the end of the second guide, we're asked to play around with the tests. I added: console.log(net.run([0, 4])); console.log(net.run([3, 3])); console.log(net.run([8, 4])); Based on the training data,…

Ty! This means a lot! Can you point me to the tutorial you added new tests with?

Re: Neural networks in JavaScript – free 19-part course

#67
post #26

Hey guys! I'm the creator of the course and lead developer of brain.js and would love to answer any questions you may have.

Thanks for this. It is certainly a lot simpler than grappling with jupyter notebooks & numpy and the like. The course is fairly short but covers off a bunch of stuff.

Couple of thoughts:

- The "hello world" of ML seems to have kinda settled on CNN "cat detector" or MNIST type things now (for better or worse). It does not appear that brain.js has support for CNNs yet(?), but it might be nice to address this in the course somehow - even if it is just "this is coming soon". Lots of people are visual learners - it would be neat for this to be supported somehow, e.g. for brain.js to support loading training data via URLs or grabbing a frame from a webcam and doing some basic stuff with images. This kinda goes for the brain.js webpage too - the demo there is a bit underwhelming compared to the fun tensorflow playground @ https://playground.tensorflow.org/

- It might be nice to see a few more "real world" examples of doing things that real people might want to do, e.g. a comment toxicity/spam detector for their sites that runs real-time in the browser. From this course I am not sure how to load in a pre-trained model for instance.

- I tried to use the GPU NeuralNetwork in a couple of the sessions but I got a "TypeError: array is undefined (1.6.0/browser.js:18548)" error.

Re: Neural networks in JavaScript – free 19-part course

#68
post #39

Thanks 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…

afaik it's mostly for cool demos and educational purposes, or extremely latency intensive applications that funny require large models. for most deep learning models, training on the client is completely unreasonable, as they require weeks of training even on multi thousand $ pro equipement. For training, tiny metalearning models are the only reasonable thing to train on the clients in most useful scenarios, as they…

Keep in mind that while the tutorial is in javascript, in the web browser, the neural network easily apply for node based solutions as well.

We're adding GPU support that use either client side OR server side GPU, so that any case you mention can be handled.

Re: Neural networks in JavaScript – free 19-part course

#69

Earlier quoted context omitted.

coz its the best language for prototyping and learning

It really, really super isn’t. It’s a Frankenstein mashup of programming insanity that never should have come into being in the first place, much less become the de facto language of the web.

So, what language is not an insanity?

Re: Neural networks in JavaScript – free 19-part course

#70
post #55

Earlier quoted context omitted.

> To deploy a model in js (as a web page) all you need is a static S3 or GCS bucket. 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 anywa…

> First of all, what you have described is far from the reality. Did you try any of the links I included? This is the reality for all of them and they are a few years old. They have a model file loaded from bucket url and never make another network request thereafter. It's actually the recommended workflow from https://js.tensorflow.org/ where you'd find tons of other examples. But you're right, this is for inference…

What I mean reality here is the running nn model in browser is possible, but not practically efficient, so even with its perceived simplicity, people would under most occasions, run the inference in the cloud, with its controllability and performance, like using customized hardware. After all, running inference is about to run it reliably and fast, until the day when nn operations are ubiquitous and common enough to be standardized and shipped in performant runtime that come out-of-box, browser inference is still a dream that is too good to be true.
Post reply on HN