hey everyone welcome to intellipaat and we are back again with another interesting
video on a versus topic so you guys must be aware about the buzzword going on
these days which is deep learning right and 2015 was a time when we actually
observed some of the biggest evolutions in the industry of AI and deep learning
how by the introduction to two of the most popular libraries which are keras
and tensor flow which one to choose and when to choose that is what we're gonna
cover up in this video on keras versus tensorflow so guys before we proceed
further do subscribe to intellipaat YouTube channel so that you never miss
out on any of our upcoming videos alright guys now let's have a look at
the agenda for this video first and foremost we're gonna discuss what
exactly Keras and what exactly is tensorflow
after that we gonna differentiate between both of these terms based on free of a
parameters such as architecture prototyping debugging coding performance
and a lot more after discussing these factors we're gonna look into the pros
and cons of using both Karas and tensorflow followed by the popularity and the
job trends in both of them then finally we'll conclude our video by discussing
which one of them is better to choose we'll also have a short quiz based on
the video make sure you put down your answers in the comment section below to
know if you are correct also guys if you're looking to get certified in
artificial intelligence then do check out intellipaat's AI engineer master
course in association with IBM the link is given in the description box
alright guys now without any further ado let's get started alright guys as
discussed let us begin with understanding what exactly are both
Keras and tensorflow first let us understand what exactly is Keras so guys
Karas is nothing but an open source high-level neural network library and as
it is written in Python hence the structure of the code is easy to
understand and use this high level API build on tensorflow has the capability
to run on top of other frameworks and libraries such as tensorflow
Theano CNTK and so on right so being used in deep learning it allows for easy
and fast prototyping and runs smoothly on GPUs and CPUs right so now let us
understand what exactly is tensorflow so tensorflow
again is an open source and free software library for data flow it is
also known as symbolic math library it is mainly used for machine learning
applications such as neural network and is primarily used for research and
production at Google right so you can also say that it is flexible and
comprehensive ecosystem of libraries tools and other resources which provide
workflows with high level api's moreover it can be used for full production and
deployment of machine learning pipelines right so as we have discussed about the
brief introduction to both Keras and tensorflow
now let us move forward discuss few of the parameters based on which we will
differentiate between both Keras and tensorflow so guys the first
parameter that we have here is the architecture so Keras has concise and
simple architecture whereas tensorflow provides keras as a framework that
makes work more easier right now the next factor that we have here is the
prototyping so in Kearas complex models can be quickly build by writing the
codes right on the other hand in tensorflow beginner can feel some
difficulty writing the code from scratch itself right now the another parameter
here is the coding so guys Keras is easier to code as it is written in
Python and tensorflow is written in both python and c++ and it is difficult to
implement custom and new functions like activation function etc right the
another factor here is the debugging so in Keras sense a deals in simple
networks hence lesser number of errors and less need for repeated debugging
right and case of tensorflow as it deals in complex neural networks there are
chances of more number of errors which makes debugging quite difficult but
recently since the introduction of previous update tensorflow comes with an
inbuilt debugger which can debug during the training as well as generating the
graphs right which pretty much make things easier isn't it so the another
factor here is the training time so in Keras it takes a longer duration to
train the models on the same data sets and it takes more than two hours for
40,000 steps of training the models whereas guys tensorflow finishes
training of 4,000 steps in around 15 to 20 minutes sounds convenient isn't it
now the another factor we're gonna discuss assets of data so as we
discussed earlier that Keras deals easily with simple networks right so
that is why Keras is used for small data sets as it is slower compared to
tensorflow on the other hand tensorflow is used for
complex data sets and high-performance models which requires the fast execution
right next is api's level so Keras says high level API and runs on top of
tensorflow as we discuss right even on Theano and CNTK it is easy to use
and facilitates faster development whereas tensorflow is the framework that
provides both the low and high level API so in huge use cases tensorflow
provides you both level options right so next parameter here is the performance
so guys in Keras the performance is quite slow even if you observe the
previous factors right so but tensorflow is suitable for high performances now as
we have discussed the parameters let us move forward and discuss about the
benefits of using both Keras and tensorflow
a quick info if you want to get certified in artificial intelligence
then do check out intellipaat's artificial intelligence engineer
master's course in association with IBM the link is given in the description box
below so first of all benefits of using Keras so the first benefit that we have
here is the user friendly so yes Keras is user friendly as it has consistent
and simple interface which is mainly optimized for common use cases that
gives clear feedback for user errors right the another benefit we have is
modular and Keras models are normally made by connecting configurable building
blocks together and it is easy to extend in this you can easily create or write
custom building blocks for the new research and ideas another point to note
is that it is easy to use or access as Keras offers you simple API which is
used to minimize the number of user actions required for common use cases
and gives proper feedbacks to user errors hence it is easy to use now
moving on to the benefits of using the tensorflow first thing first it has got
robust machine learning production so as tensorflow
allows you to train and deploy a model effortlessly even if you are using
different language or platform you can use this easily and another benefit over
here is easy model building it provides multiple levels of abstraction to train
and build the models the third point we have here is a powerful experiment for
research it offers you control and flexibility with features like the
Keras functional API and model sub-classing API for the creation of
complex topologies right so as we have discussed about the benefits of
using both Keras and tensorflow now let us move forward and discuss about the
limitations of using both of them so as first and foremost limitations of using
Keras when we talk about the limitation then keras though it is touted as a
simple interface than other frameworks but it is difficult to work with except
for the simple networks and Keras always needs a back-end framework like
tensorflow except for a few features Keras always needs calls to the
backend like calling directly or through the Keras back end api then getting out
of backendcalls can be very tricky now the another point note here is if your
inputs and outputs are not the same in the bass dimension then Keras will
always throw an error to you right and the fourth limitation that we have here
is the calling a keras layer from a custom layer makes those layers
untrainable so that sounds quite unconvenient right guys and there's the
fifth limitation that we have here is using keras for complex networks with
multiple outputs direct calls to back-end etc your summary output gets
broken here right so these are the limitations of using keras now let us
discuss the limitations of using tensorflow so the first limitation that
we have here is no support for Windows so as we know that there are a wide
variety of users comfortable in working with a Windows environment rather than a
Linux in their system and tensorflow does not allow these users here as a
Windows user you will have to install it within a conda environment or by using
the Python package library or P IP right so the another factor to note here is
tensorflow does not support GPUs other than the Nvedia right and the third
point note here is it is only supported by python language which makes it a huge
drawback as other languages are on a rise in deep learning itself right guys
so if we talk about the computation speed tensorflow gives around eight to
nine thousand computation speed on one GPU right and around twelve thousand on
the two GPUs and it cannot support more than two GPUs than this right so whereas
in case of other frameworks like CNTK it can support up to eight GPUs and it
gives around 70,000 of computational speed guys right so
moreover tensorflow demands fundamental knowledge of advanced calculus and
linear algebra along with a good standing of machine learning also right
guys so guys as we have discuss about the pros and cons in booth right now let
us have a quick glance at their popularity and trends right so as if we
talked about the popularity that despite the above pros and cons both of these
libraries are being used in huge MNC's like Facebook Microsoft Google
IBM Amazon Accenture Bosch and lots more the list never ends
but yes tensorflow has got more popularity than Keras so Keras does
not fail you as per its features but if you look at the current trends guys even
Google says the same it has got more number of search terms in every category
be job search be technology search be community search with community I mean
guys more number of developers out there to help you or support you solve the
coding problems that you're facing currently right similarly if you check
on github then tensorflow has got more number of repositories commits releases
branches and contributors then keras since they both are open source you keep
on getting more support from such platforms and even from different forums
like Stack Overflow etc it purely depends on the number of users of tensor
flows and keras and of course tensorflow has more number of users that keras so
guys after discussing the popularity now let us discuss about our last factor
that is which one is better to choose here so guys looking at the increasing
demand and growth rate of automation with deep learning in top industries one
can conclude that the use of deep neural network is definitely going to grow
rapidly so if you are interested in deep learning then you can explore either of
the framework that is keras or tensor flow so directly coming to the
conclusion that one is better than the other would be a little unfair right as
both of them have their own features and benefits of using them like tensor flow
is the open source and free software library for multiple tasks in machine
learning right whereas Keras is also an open source library of neural
networks right Keras provides a high level API but tensorflow provides both
the api's that is high and low level so guys even we discussed previously that
Keras is written in Python and it's coding structure and syntaxes are more
user friendly as compared to tensorflow since tensorflow is written in Python
and C++ languages right but as we know Keras is wrapper over back in
libraries like tensorflow CNTK and so on so even if you are using Keras
Tensorflow in back end idly you are running a tensorflow core only right but
no doubt writing code and keras is much easier as compared to tensorflow
but again it is working on tensorflow only guys also guys tensorflow offers more
advanced operations as compared to Kera's right it'll be very handy if
you're doing any kind of research or developing work on some special kind of
deep learning models so keeping hands over both would be beneficial for you
because they both are used in deep learning in every manner
so there's tensor flow with more number of features and more number of
capabilities it is the win over here right all right guys now let me wrap up
this session by asking you a small question over here in the following
options what are the advantages of using tensor flow over other libraries is it
visualization of data is it scalability pipelining debugging facility all of the
above or none of the above you can let us know your answers in the comment
section below to know if you're correct a quick can for if you want to get
certified in artificial intelligence then do check out Intellipaat's
artificial intelligence engineer master's course in association with IBM
the link is given in the description box below I hope this video was helpful to
you if you have any further queries then do let us know in the comment section
below we will reach out to you immediately so guys thank you so much
for watching this video and giving us a precious time, see you again.