Transcript:
Hello, everyone and welcome to this video. On Keras, versus tensorflow versus pie Torch! So what can you expect from this video? What’s in it for you first? We will introduce you to each of these platforms. Tensorflow Keras and Pytorch In Brief, Then we will look at how these platforms differ from each other, based on certain criterias, such as level of API, speed, architecture, data sets and debugging ease of deployment and ease of development. And finally we will wrap up this video by seeing which framework you should use, so let’s get started before we can see the differences between these platforms. We first need to know what exactly each of these platforms are lets. Start with tensorflow. What is tensorflow? Tensorflow is a low-level software library, which is created by Google to help implement machine learning models and to solve complex numerical problems. Tensorflow is nothing but a free and open source software library for machine learning it can be used across a range of tasks, but has a particular focus on training and inference of deep neural networks. Tensorflow is a symbolic math library. Based on data flow and differential programming. It is used for both research and production at Google. What do you mean by data flow? It basically means that we perform calculations by converting every element into graphical form. The variables of the graph are called tensors and mathematical operations are called operators here in the computational graph shown. You can see that X Y and 2 are the variables they will also be called tensors and division multiplication and addition are the operators This graph basically shows us the calculation that is going to occur in a machine learning model where X and Y are going to be divided and Y and 2 are going to be multiplied. The results of these two calculations are then going to be added to give us the final output. I told you that X y and 2 are also called Tensors. What exactly are tensors? Tensors are multi-dimensional arrays with a uniform type. All tensors are immutable, like python numbers and strings, which means that you cannot update the contents of a tensor. You can only create a new tensor. Next, lets. Look at the API Keras! What exactly is Kera’s? Keras is a high level deep learning API written in Python for easy implementation and computation of Neural Networks. Keras is an open source software library that provides a tensorflow interface for artificial neural networks. Kera’s acts as an interface for the Tensorflow Library, which means that it runs on top of tensorflow up until version. 2.3 Keras supported multiple back-ends, including Tensorflow Microsoft Cognitive Toolkit, As of version 2.4 Only Tensorflow is supported as a version 2.4 only tensorflow is supported designed to help enable fast experimentation with deep neural networks in it focuses on being user friendly, modular and extensible. Keras is a high level API of tensorflow, an approachable, highly productive interface for solving machine learning problems with the focus on modern, deep learning, it provides essential abstractions and building blocks for developing and shipping machine learning solutions with high iteration Velocity. Keras does not perform its own low level operations, such as Tensor Products and Convolution. It relies on back end engines for that, Even though Keras supports multiple back-end engines, its primary back-end engine is tensorflow and its primary supporter is Google, which means that Kera’s acts as nothing more, but a wrapper class around tensorflow, theano cntk blade, ML or Mxnet, which are low level Apis. Next, we will look at Pi Torch. What exactly is Pytoch? Pytoch is a low level API, which is developed by Facebook for natural language processing and computer vision. It is a more powerful version of numpy. It is an open source machine. Learning library based on the torch library used for applications such as computer vision and natural language processing primarily developed by Facebook’s. Ai research lab. It is free and open source software released under the modified BSD license, although the python interface is a more polished and the primary focus of development. Pytorch also has a C plus plus interface. Python is a widely liked language because it is easy to understand and write Pytorch emphasizes flexibility and allows deep learning models to be expressed in basic Python. Pytorch is mainly used for natural language processing and for computer vision. Now let’s move on to the differences between Tensorflow Keras and Pytorch. The first difference that we’ll be looking at is called level of API, There are two main types of Apis, a low level API and a high level API API stands for application programming interface. A low level application programming interface is generally more detailed and allows you to have more detailed control to manipulate functions within them on how to use and implement them. While a high level API is more generic and simple and provides more functionality with one command statements than a lower level. API high level interfaces are comparatively easier to learn and to implement the models using them. They allow you to write code in a shorter amount of time and to be less involved with the details. In this case? Tensorflow is a high and low level api. Pure Tensorflow is a low level API, while tensorflow wrapped in Keras is a high level API Keras in Itself is a high level API, which uses multiple low-level apis as a back-end and simplifies the operation of these low-level apis. Pi Torch is a low level API. The next criteria that we’ll be looking at is speed. Tensorflow is very fast and is used for high performances. Keras is slower as it works on top of tensorflow. Not only does it have to wait for tensorflow to finish implementation. It then starts its own implementation. Meanwhile, Pi Torch works at the same speed as tensorflow as both of them are both low level Apis. Now Keras is a wrapper class for tensorflow and has added abstraction functionalities on top of tensorflow, which make it slower than tensorflow and Pi Torch in computation speed. Both tensorflow and Pi Torch are almost equal and in development speed, Keras is faster as it has Built-in functionalities, which can significantly reduce your development time. The next difference is on the architecture. Tensorflow is not very easy to use and even though it provides Keras as a framework that makes it work easier. Tensorflow still has a very complex architecture, which is hard to use. Meanwhile, Kera’s has a simpler architecture and is easier to use it provides a high level of abstraction, which makes implementation of programs in Kera’s significantly easier pie touch on the other hand also has a complex architecture and the readability is less when compared to Kera’s Tensorflow uses computational graphs, which makes it very complex and hard to interpret, but it has amazing computational ability across platform’s. Pie Touch is a little hard for beginners but is really good for computer vision and deep learning purposes, Data sets and debugging tensorflow works with large data sets due to its high execution, speed and debugging is really hard in tensorflow due to its complex nature. Meanwhile, Kera’s only works with very small data sets as its speed of execution is low programs do not require frequent debugging in Keras, as they are relatively simpler, and Pi Torch can manage high level tasks in higher dimension data sets and is easier to debug than both qrs and tensorflow next. We’ll be looking at ease of development, as we said before Tensorflow works with many hard concepts such as computational graphs and tensors, which means that writing code in tensorflow is very hard, it is generally used by people when they are doing research work and really need very specific Functionalities. Keras, on the other hand, provides a high level of abstraction, which makes it very easy to use. It is best for people who are just starting out with python and machine. Learning Pytorch is easier than tensorflow, but is still comparatively hard than Keras. It is not very easy to learn for beginners but is significantly more powerful than just Plain Kera’s ease of deployment. Tensorflow is very easy to deploy as it uses. Tensorflow serving tensorflow serving is a flexible high performance serving system for machine. Learning models designed for production environments, Tensorflow serving makes it easy to deploy new algorithms and experiments while keeping the same server architecture and Apis Tensorflow serving provides out-of-the-box integration with tensorflow models but can be easily extended to serve other types of models and data in Kera’s model deployment can be done with either tensorflow serving or flask, which makes it relatively easy, but not as easy as you as it would be with tensorflow and pie Torch Pytorch uses I torch Mobile, which makes deployment easy, but again for Tensorflow deployment is way easier as tensorflow serving can update your machine learning back end on the fly without the user, even realizing there’s a growing need to execute ML models on edge devices to reduce latency, preserve privacy and enable new interactive use cases in the past engineers used to train models. Separately, they would then go through a multi-step error-prone and often complex process to train the models for execution on a mobile device. The mobile runtime was often significantly different from the operations available during training, leading to inconsistent developer and eventually user experience. All of these frictions have been removed by Pytorch mobile by allowing a seamless process to go from training to deployment by staying entirely within the pytorch ecosystem, It provides an end-to-end workflow that simplifies the research to production environment for mobile devices. In addition, it paves the way for privacy, preserving features via Federated learning techniques at the end of the day. The question that really matters is which framework Should you use Kera’s? Tensorflow or Pytoch? Now, Tensorflow has implemented various levels of abstraction to make implementation of deep learning and neural networks easy. This has also made debugging easier. Keras is simple and easy, but not as fast as tensorflow. It is more user friendly than any other deep learning API, however, and is easier to learn for beginners Pytorch on the other hand is the preferred deep learning API for teachers, but it is not as widely used in production as tensorflow is it is faster, but it has lower GPU utilization at the end of the day, the framework that we would suggest that you use is tensorflow why while Pytorch may have been the preferred deep learning library for researchers, tensorflow is much more widely used in Day-to-day production, Pytorch’s ease of use, combined with the default ego execution mode for easier debugging, predestines it to be used for fast. Hacky solutions and smaller scale models. But tensorflows extensions for deployment on both servers and mobile devices, combined with the lack of python overhead, makes it the preferred option for companies that work with deep learning models. In addition, the Tensorflow board visualization features offers a nice way of showing the inner workings of your model to say your customers. Meanwhile, between Tensorflow and Keras. The main difference isn’t in performance. Tensorflow is a bit faster due to less overhead, but also the level of control You would like Kera’s is much easier to start with than plain tensorflow, but if you want to do something with Keras, that doesn’t come out of the box will be harder to implement that tensorflow on the other hand allows you to create any arbitrary computational graph providing much more flexibility. So if you’re doing more research type of work, tensorflow is the sure route to go due to the flexibility that it provides. This brings us to the end of this video on Keras versus tensorflow versus Pie Torch. We hope that this video was useful to you on your journey to learning more about deep learning to learn more about deep learning and related topics. You can check out the simply learn website, which is linked in the description below to keep learning with fun interactive videos. Do subscribe to the simply learn channel. Thank you for watching and keep learning. Hi, there! If you like this video, subscribe to the simply learn Youtube channel and click here to watch similar videos. Turn it up and get certified. Click here.