Hi, Mi Fans!
So, you want to learn deep learning? Whether you want to start applying it to your business, base your next side project on it, or simply gain marketable skills – picking the right deep learning framework to learn is the essential first step towards reaching your goal. Therefore, I strongly recommend that you pick either Keras or PyTorch. These are powerful tools that are enjoyable to learn and experiment with. Let's know more about these tools!
Keras and PyTorch are open-source frameworks for deep learning gaining much popularity among data scientists.
pytorch-top-deep-learning-framework.jpeg (22.85 KB, Downloads: 0)
2018-06-29 14:00:41 Upload
PyTorch is one of the newest deep learning framework which is gaining popularity due to its simplicity and ease of use. Pytorch got very popular for its dynamic computational graph and efficient memory usage. The dynamic graph is very suitable for certain use-cases like working with text. Pytorch is easy to learn and easy to code. For the lovers of oop programming, torch.nn.Module allows for creating reusable code which is very developer friendly. Pytorch is great for rapid prototyping especially for small-scale or academic projects.
dynamic_graph_pytorch.gif.pagespeed.ce.iN6pBa49nI.gif (135.93 KB, Downloads: 0)
2018-06-29 13:47:01 Upload
François Chollet, who works at Google developed Keras as a wrapper on top of Theano for quick prototyping. Later this was expanded for multiple frameworks such as Tensorflow, MXNet, CNTK etc as back-end. Keras is being hailed as the future of building neural networks. Keras is designed to remove boilerplate code. Few lines of keras code will achieve so much more than native Tensorflow code. You can easily design both CNN and RNNs and can run them on either GPU or CPU. Currently, Keras is one of the fastest growing libraries for deep learning. The power of being able to run the same code with different back-end is a great reason for choosing Keras.
Ease of use and flexibility:-
Consider this head-to-head comparison of how a simple convolutional network is defined in Keras and PyTorch:
The code snippets above give a little taste of the differences between the two frameworks. As for the model training itself – it requires around 20 lines of code in PyTorch, compared to a single line in Keras. Enabling GPU acceleration is handled implicitly in Keras, while PyTorch requires us to specify when to transfer data between the CPU and GPU.
PyTorch is as fast as TensorFlow, and potentially faster for Recurrent Neural Networks. Keras is consistently slower. As the author of the first comparison points out, gains in computational efficiency of higher-performing frameworks (ie. PyTorch & TensorFlow) will in most cases be outweighed by the fast development environment, and the ease of experimentation Keras offers.
Keras and PyTorch are both excellent choices for your first deep learning framework to learn.
If you’re a mathematician, researcher, or otherwise inclined to understand what your model is really doing, consider choosing PyTorch. It really shines, where more advanced customization (and debugging thereof) is required or when we need to optimize array expressions other than neural networks. As far as training speed is concerned, PyTorch outperforms Keras.
Keras is without a doubt the easier option if you want a plug & play framework: to quickly build, train, and evaluate a model, without spending much time on mathematical implementation details. Keras is more concise and has simpler API.
Here is the Popularity Growth Graph:
So guys, which framework experience appeals to you more? Let me know in the comment section below!
In order to fulfill the basic functions of our service, the user hereby agrees to allow Xiaomi to collect, process and use personal information which shall include but not be limited to written threads, pictures, comments, replies in the Mi Community, and relevant data types listed in Xiaomi's Private Policy. By selecting "Agree", you agree to Xiaomi's Private Policy and Content Policy .