Re:Neural Networks in JavaScript with Deeplearn.js
by yazr on Tuesday December 05, 2017 @04:53PM
(#15856376)
Does anyone have performance figures ?
Is is 10x 100x 3x slower than standalone GPU lib ?!
Re:Neural Networks in JavaScript with Deeplearn.js
by brianchu on Tuesday December 05, 2017 @10:29PM
(#15858231)
When possible, most DL frameworks take advantage of Nvidia's specialized CuDNN libraries, which often provide a 10x+ speedup (and are obviously not available via WebGL). So at least on the latest Nvidia cards, you will likely see a 10x slowdown, and probably even more.
Re:Neural Networks in JavaScript with Deeplearn.js
by jorgemf on Tuesday December 05, 2017 @05:55PM
(#15856875)
It uses WebGL to use the GPU, so probably is closer to other standalone libs (but I guess it will depend on the kernels the Networks uses and how WebGL can handle them)
Re:Neural Networks in JavaScript with Deeplearn.js
by amelius on Tuesday December 05, 2017 @05:10PM
(#15856518)
What is so appealing about a delayed execution model? Why can't we just perform tensor math as in numpy, and let the library figure out the fastest way to do it behind the scenes? I think the whole "graph" approach is making things needlessly complicated.
Re:Neural Networks in JavaScript with Deeplearn.js
by dsmilkov on Tuesday December 05, 2017 @05:40PM
(#15856747)
Check out our roadmap: https://deeplearnjs.org/docs/roadmap.html (we are working on eager mode / define-by-run computation)
Re:Neural Networks in JavaScript with Deeplearn.js
by quadrature on Tuesday December 05, 2017 @08:00PM
(#15857678)
That would be nice for experimentation but for production use cases knowing the whole graph unlocks a number of optimizations.
Re:Neural Networks in JavaScript with Deeplearn.js
by argonaut on Tuesday December 05, 2017 @10:09PM
(#15858171)
This is a meme that keeps getting repeated, and I don't know why. Tensorflow, for example, despite several years of development, does basically little to no graph optimizations and for tons of tasks ends up much slower than PyTorch / Chainer / DyNet (Tensorflow is developing a "JIT compiler" but it is still in alpha).
It goes without saying that a framework that does define-by-run also knows the whole graph.
Re:Neural Networks in JavaScript with Deeplearn.js
by nsthorat on Tuesday December 05, 2017 @05:31PM
(#15856662)
Author of deeplearnjs here. We hear you, and we 100% agree. Stay tuned.
Re:Neural Networks in JavaScript with Deeplearn.js
by amelius on Tuesday December 05, 2017 @05:59PM
(#15856904)
That's great to hear.
By the way, if you'd make your interface more general than deep learning, your library could be the start of an alternative for numpy/scipy on JS, and it would be even faster than the original Python version because it uses the GPU. Just a thought ...
(One small downside is that JS doesn't have the nice operator overloading that Python has, afaik)
Re:Neural Networks in JavaScript with Deeplearn.js
by nsthorat on Tuesday December 05, 2017 @07:22PM
(#15857481)
We call ourselves deeplearn.js, but you can use it for general linear algebra! Our NDArrayMath layer is analogous to NumPy, and we support a large subset of it (we support many of the linear algebra kernels, broadcasting, axis reduction, etc).
The API mimics the structure of TensorFlow and NumPy, with a delayed execution model for training (like TensorFlow), and an immediate execution model for inference (like NumPy). We have also implemented versions of some of the most commonly-used TensorFlow operations. With the release of deeplearn.js, we will be providing tools to export weights from TensorFlow checkpoints, which will allow authors to import them into web pages for deeplearn.js inference.
https://research.googleblog.com/2017/08/harness-power-of-mac...