4 ms·
I've heard that Tensorflow is built to take advantage of multiple GPUs automatically, whereas Theano (by default at least) can only make use of a single GPU.
by melse 10y ago
I've heard that Tensorflow is built to take advantage of multiple GPUs automatically, whereas Theano (by default at least) can only make use of a single GPU.
- bike4beer 10y agoTF is still single-thread, massive problem for real concurrency. What TF can do is take one graph and distribute the work among many GPU's or CPU's. Massive Scaling problems, I think over 5 Cpu's TF begins to degrade https://arimo.com/machine-learning/deep-learning/2016/arimo-distributed-tensorflow-on-spark/ https://arimo.com/machine-learning/deep-learning/2016/arimo-... * Problem is TF was not written for distributed systems, it would need to be rewritten from scratch. One rumor is google made TF public, because its obsolete, in house they have rewritten a new product, but their not going to share it. * It's google and people like google, TF is a wrapper, there is even a wrapper for the wrapper called "TFLearn" that is much easier to use than TF. What is best? Depends upon what you like Lua, python, C++, amd or nvidia, intel or amd, once you tie yourself to language and hardware you only have a few choices. Not much of anything is new we weren't doing in Mathematica 8 years ago. Then it was free to download via piratebay, and worked just fine with nvidia hw, now its 2017 and you can get it for free from google, and it supports the same nvidia hw. * Learn them all, they all have pluses & minuses, sadly I would say 90% of the code examples on github for ML are broken, or don't work, thus you need to spend months learning which works. Another good reason for 'tflearn' it all works, and the stuff from Montreal works.
- sja 10y ago"Automatically" isn't the best word, as TensorFlow won't make use of multiple GPUs unless you explicitly tell it to (at this time). That said, there are a number of benefits to using TensorFlow (including the ability to use multiple GPUs, if not automatically :) ) - Several common gradient optimization algorithms (Momentum, AdaGrad, AdaDelta, Adam, etc) are implemented already, which makes it a bit faster to get your training logic in place - Going along with the above, there is more in the TensorFlow API focused specifically on training models, as opposed to being purely a math engine. Some might consider the extra funtionality "bloat", but I think it serves a good purpose - The afforementioned multi-GPU functionality is nice, once you get used to it. It's good for either training multiple versions of a model in parallel or doing data parallel updates of parameters - There are tools for compiling your trained models as static C++ binaries on mobile devices - The TensorFlow ecosystem is quite nice: TensorBoard for visualizing training, the topology of your model, and various statistics (most recently visualizing projections of embeddings). TensorFlow Serving for deploying trained models. TF Slim for a more Keras-like layer by layer approach to model building. Several pre-trained models to jump start your own work. - No compile times. There is a "no optimizations" option in Theano to remove the compilation, but many people's experience with Theano is having to wait to iterate on their code. - I think the community is pretty swell too :) The Google team does a good job of responding to and working with folks who open issues or PRs Generally, I'd say TensorFlow is really good when you want to minimize the amount of time between researching, training, and deploying your model. Edit: line formatting
- krab 10y ago> - There are tools for compiling your trained models as static C++ binaries on mobile devices I'm looking for such tool but I haven't found anything apart from C++ libraries that also focus on training. Can you give me some pointers? Thanks.
- sja 10y agoIn the contrib folder in the TensorFlow project, you'll find the makefile subdirectory: https://github.com/tensorflow/tensorflow/tree/master/tensorflow/contrib/makefile https://github.com/tensorflow/tensorflow/tree/master/tensorf... The readme has a general overview of how you'll approach using it. Note that you'll want to optimize for inference (remove unnecessary operations from the graph) [0] and freeze your graph (convert Variables into constant tensors) [1] to drop in your own model for the pretrained Inception model that's used as an example. [0]: https://github.com/tensorflow/tensorflow/blob/master/tensorflow/python/tools/optimize_for_inference.py https://github.com/tensorflow/tensorflow/blob/master/tensorf... [1]: https://github.com/tensorflow/tensorflow/blob/master/tensorflow/python/tools/freeze_graph.py https://github.com/tensorflow/tensorflow/blob/master/tensorf...
- p1esk 10y agoActually, Theano supports multiple GPUs as well: http://deeplearning.net/software/theano/tutorial/using_multi_gpu.html http://deeplearning.net/software/theano/tutorial/using_multi...