3 ms·
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
by amelius 9y ago
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.
- 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.