Skip to main content

PyTorch — The Future of Machine Learning Frameworks?


pytorch python machine learning
PyTorch is a Python-based Machine Learning library with GPU support. It can be used as easily as NumPy and is built upon the famous Torch library. The main feature is that Neural Networks can be built dynamically making way for learning more advanced and complex AI tasks.

When it comes to implementing Deep Learning models, there are ample Open Source frameworks available. One of the popular frameworks – Torch, started as a scientific computing library in Lua programming language, but with the integration of CUDA C (for GPU computing) and ML Libraries, it soon became a standard ML Framework. Deep Mind was using Torch7 before moving on to Google’s TensorFlow framework. Facebook is one of the major users and contributors for Torch.
One reason for Torch losing its popularity is because of learning LuaJIT. Although LuaJIT is the fastest JIT (Just-In-Time compiled language) and interfaces very well with C/C++, learning it is a significant bottleneck for newcomers and enthusiasts. But now, Facebook AI Research (FAIR) has released the PyTorch framework – A Python Wrapper for Torch. PyTorch aims to remove this bottleneck and is packed with lots of features –
  • PyTorch can be used as a replacement for NumPy with GPU support
  • A Deep Learning platform with highest flexibility and speed
  • Dynamic construction on Neural Networks

Building Neural Networks Dynamically –

All along, we have been implementing the AI models in a static way, i.e. the model is constructed with attributes of the data incorporated into it. Therefore, once a model is built, it can only be reused. Changing the behavior of the network requires a complete rebuilding of the model from scratch. This is how the popular ML frameworks like TensorFlow, Theano, Caffe, CNTK work.
But there has been a growing interest in constructing neural networks dynamically. i.e. during the runtime. It should not be confused with Dynamic Neural Networks. PyTorch and few other frameworks like DyNet offer this feature. Of course, building Dynamic Neural Networks like Recursive Neural Networks becomes much easier in these frameworks. Constructing NNs dynamically offers a good advantage. One can use an instance of a network for learning a particular structure of the input and deploy multiple such instances to form a complete model.
For example, in Natural Language Processing, the question “What is the color of the object right of the cat?” has so many levels of understanding – identifying the cat, moving right, identifying the color of that object. Different questions have varying levels and a Network built dynamically would be the most appropriate for such a task. The following image shows how the question “Is there a red object above a circle?” is understood at different levels and is answered.
Content Understanding
Content Understanding for the question “Is there a red object above a circle?”
PyTorch dynamically builds the network using a technique called Reverse-Mode Auto-Differentiation, but it is beyond the scope of this post. The supremacy of PyTorch is that it performs the optimization tasks faster and makes the models maximally memory efficient compared to other ML libraries providing the same features.
dynamic_graph
Dynamically Building Neural Networks
The Dynamic view of Neural Networks is the future. By being one of the first ML frameworks to bring in this feature, PyTorch would surely make a lot of researchers shift to it. What are your thoughts about Dynamic Neural Networks? Give PyTorch a try and share your experience with us.
You might want to add something, drop your thoughts in the comments.

Comments

Follow Us

WHAT'S HOT

Best Gaming Linux Distros You Need To Try In 2017

Gaming on Linux scene is improving each year with better hardware support and increasing support from game developers. Apart from established distros like Ubuntu and Arch Linux, gamers are using gaming Linux distros like Steam OS to get a better experience. The other It’s gaming operating systems are Sparky Linux – Gameover

Learn How To Activate iOS 11 Dark Mode

Apart from all the major iOS 11 features and changes, there are some hidden and minor features as well. In this release, Apple has included a feature named Smart Invert Colors, which is the closest you can get while looking for an iOS 11 dark mode.

Microsoft Set To Put Fingerprint Sensor In Keyboard Keys

According to a new patent titled “ Keyset Fingerprint Sensor ,” Microsoft might be working to integrate the fingerprint sensor in keyboard keys. The fingerprint recognition might be done

Latest Linux Distribution Releases List

This list is prepared with the inputs from different Linux distro developers and the official release notes. But, before going ahead and taking a look at latest releases, don’t forget to check out our useful lists of best Linux distros of 2017: Best Linux Distro For Beginners Best Linux Distro For Gamers Best Lightweight Linux Distros Best Operating Systems For Ethical Hacking Linux Distribution Releases (July 2017) Linux Mint 18.2 Release Date: July 2nd, 2017 You can read about Linux Mint 18.2 Sonya in detail  on 9jabreezeland . 4MLinux 22.0 Release Date: July 1st, 2017 4MLinux 22.0 is the latest stable release. It comes loaded with LibreOffice 5.4.0.1, GIMP 2.8.22, Dropbox 28.4.14, Firefox 54.0, Chromium 59.0.3071.86, etc. The biggest change comes with 4MLinux Server, which is a lightweight and fast server Linux distro. You can read more about 4MLinux 22.0  here . Netrunner 17.06 Release Date: July 1st, 2017 Netrunner 17.06, codenamed Daed...