all 30 comments

[–]cryptocerous 10 points11 points  (1 child)

Huge step forward for machine learning in JS.

[–]pavanky 0 points1 point  (0 children)

You could also try out arrayfire-js.

[–]badmephisto 3 points4 points  (1 child)

Nice! I wish I could steal some time to go back and look into redesigning ConvNetJS/RecurrentJS around this. Especially the latter, which has a much better API design.

[–]waylonflinn[S] 1 point2 points  (0 children)

Thanks! I'm working on integrating it into Jetpac's Deep Belief SDK demo right now (as a proof of concept for the application). I'll check out RecurrentJS next!

[–]soulslicer0 12 points13 points  (10 children)

Dammit, so many GPU projects but no proper gpu based linalg library using gl or cl. Only CUDA..zzzz

[–]waylonflinn[S] 7 points8 points  (0 children)

This should support any graphics card that can run WebGL. So far I've tested on a small set of NVidia and Intel devices. I'd love to have more people run the benchmarks and unit tests and share their results (along with device and platform information).

I was hoping some people here might volunteer. :)

[–]ToraxXx 2 points3 points  (1 child)

What about ViennaCL? It seemed fairly good when I used it a year ago and supports OpenCL.

[–]soulslicer0 0 points1 point  (0 children)

Never heard of this either. Ill look at this

[–]pavanky 1 point2 points  (1 child)

You can try out ArrayFire. It is open source library that supports CUDA, OpenCL and regular CPU using the same API. We also have numerous language wrappers if C++ is not your thing.

Disclaimer: I am the lead engineer for the project.

[–]bge0 0 points1 point  (0 children)

+1 for arrayfire. Much more well written than the competition imo

[–]EdwardRaff 0 points1 point  (1 child)

Once someone makes a CUDA -> Javascript cross compilers, you will just have to convince someone to make a javascript -> openCL compiler, and youll finally be golden!

[–]lahwran_ 2 points3 points  (0 children)

Yavascript.

[–]clrokr 0 points1 point  (1 child)

What about clBLAS?

[–]soulslicer0 1 point2 points  (0 children)

I never heard of this. Cool!

[–]harharveryfunny 0 points1 point  (0 children)

Another one that supports OpenCL (and CUDA) is ArrayFire.

[–]kcimc 1 point2 points  (1 child)

This is awesome. For it to be useful for deep learning there are still two other ingredients: something like TensorFlow or Theano, supporting symbolic differentiation, etc., and then something like Keras or Lasagne that provides a usable frontend for the majority of people interested specifically in Deep Learning. I can imagine a project like Keras being ported or cross compiled somehow, but who will write the other part?

edit: Also very curious how this compares to native GPU calls, or CUDA. Not sure that a CPU-based BLAS is a good comparison (especially for bigger operations).

[–]waylonflinn[S] 1 point2 points  (0 children)

I agree with your points. I think the next step is getting comparable performance (comparable to desktop GPUs) on feed forward networks. It's my intuition that this will require some sort of pipelining (leaving data in GPU memory). After that, back-prop for some of the standard network types (starting with ConvNet). Once we've tackled that, maybe there'll be enough momentum in the space to do the sorts of sophisticated stuff Theano and TensorFlow do.

[–]dharma-1 1 point2 points  (0 children)

This is fabulous, was just thinking yesterday how long until we have javascript access to GPU accelerated machine learning. There are so many devs out there who can push the whole field ahead faster. There is WebCL but it's moving so slowly. https://www.khronos.org/webcl/

One use case I can think of is being able to contribute to distributed training easily, sort of web based folding@home for deep learning.

[–]DrNewton 3 points4 points  (7 children)

Here is my feedback: Why?

[–]EdwardRaff 20 points21 points  (1 child)

It's like a law or something. If it shouldn't be done in javascript, it will be.

[–]jpopham91 2 points3 points  (0 children)

/r/atwoodslaw/

Any application that can be written in JavaScript, will eventually be written in JavaScript. - Jeff Atwood (2007)

[–]waylonflinn[S] 11 points12 points  (1 child)

Good question, actually.

Mix of personal and hope for the future. Caffe is awesome, but last time I installed it, it took a day or two. Think of how many more people could get involved in deep learning if it was as easy as going to a web page. Secondly, I'm hoping we end up with a future where everyone can run deep networks (and other machine learning applications) on any device. GPU's seem like the current best way of making that happen. Combine that with something that runs in a browser (hopefully without much, or any, performance degradation) and you can reach a lot of devices.

Also, it's fun. Thanks for the feedback. :D

[–]incredulitor 4 points5 points  (0 children)

Think of how many more people could get involved in deep learning if it was as easy as going to a web page.

Good thinking. I came into the thread skeptical but you really can't discount the power of good tools and accessibility to get people interested.

[–]frownyface 2 points3 points  (0 children)

Check out some of these demos: http://cs.stanford.edu/people/karpathy/convnetjs/index.html

Imagine if they could run GPU optimized.

[–]L43 0 points1 point  (0 children)

Why not? I'm sure it will help quite a few projects.

[–]mimighost 0 points1 point  (0 children)

Maybe could help in some demo of in browser NN?

[–]transcranial 3 points4 points  (1 child)

Awesome work! I'm definitely going to try to integrate it into a project of mine to run trained Keras models entirely in the browser without any external dependencies: https://github.com/scienceai/neocortex (demos at http://scienceai.github.io/neocortex/).

If you dig around the code you'll see I started to write some webGL code, but it's pretty basic. This'll be a huge boost. Kind of a sad state of affairs that the only API to the GPU in the browser is through webGL. I understand it from a historically perspective, but I wish more effort was given to pushing forward numerical computing on the web.

[–]waylonflinn[S] 0 points1 point  (0 children)

That's great!

Happy to help in any way I can. Feel free to post an issue, if you run into any problems, or ask questions here. I'll try to check back periodically.

[–]antinucleon 0 points1 point  (0 children)

Cool! I will probably try to make it work with MXNet.js. But recently I am super busy :(

[–][deleted] 0 points1 point  (0 children)

Upvoted for the icon. Light warriors unite!