4 ms·
This explanation from a Google blogpost helped me: The API mimics the structure of TensorFlow and NumPy, with a delayed execution model for training (like Tens
by ericand 9y ago
This explanation from a Google blogpost helped me:
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-machine-learning-in.html https://research.googleblog.com/2017/08/harness-power-of-mac...
- yazr 9y agoDoes anyone have performance figures ? Is is 10x 100x 3x slower than standalone GPU lib ?!
- jorgemf 9y agoIt 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)
- brianchu 9y agoWhen 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.
- amelius 9y agoWhat 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.
- nsthorat 9y agoAuthor of deeplearnjs here. We hear you, and we 100% agree. Stay tuned.
- amelius 9y agoThat'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)
- nsthorat 9y agoWe 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).
- dsmilkov 9y agoCheck out our roadmap: https://deeplearnjs.org/docs/roadmap.html https://deeplearnjs.org/docs/roadmap.html (we are working on eager mode / define-by-run computation)
- quadrature 9y agoThat would be nice for experimentation but for production use cases knowing the whole graph unlocks a number of optimizations.
- argonaut 9y agoThis 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.