TensorFlow for Beginners | TensorFlow in deep learning | TensorFlow tutorial

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
welcome to unfold data science my name is Amon and I'm a data scientist in this video I'm going to give you a walkth through of tensor flow for absolute beginners let's start let's start this video with some comparison between tensor flow and Pi torch since Last 5 Years okay I have given a filter of Last 5 Years I can give a larger filter also but let's see Last 5 Years if you see here guys right tensor flow you will was you know Way Beyond P torch if you go around 2019 and all okay and slowly what started happening is p torch started moving up recently 2022 and after that okay what that indicates is both of these are famous Frameworks due to some of the things with pytor that we discussed as part of last video pytorch has gained more momentum but tensor flow is there since long long time and it's a very very famous framework in the world of deep learning okay having understood that let's go ahead and try to see what are the topics for today's video so we are going to understand why tensor flow is such a popular framework in the world of deep learning then we are going to see how tensor flow works okay then we are going to see what is kasas and what is tensor flow and how they are different then we will do an assignment we will do an Hands-On um work and we will get our hand tensor flow and then we will discuss some additional topics as well okay so what I'm going to do here is I'm going to show you why tensor flow first of all is a very very famous and very very um you can say established framework in the world of deep learning okay so tensor flow has some of the very important properties guys that we need to understand here first of all tensor flow is very very efficient okay okay very very efficient very very scalable okay very very scalable very very flexible okay and if you want to integrate tensor flow with Cloud Frameworks or if you want to integrate tensor flow with your own apis if you want to integrate tensor flow with some other platform system right it binds very well with some other systems okay so that makes it very very uh easy to integrate okay easy to integrate due to these four five properties tensor flow is one of the most famous deep learning framework available in the market okay another advantage of tensor flow is it has a very very large set of users so what is the meaning of large set of users is you will have more libraries you will have more support you will have more communities you will have more discussions more more advancements more research right so all that thing will be there hence this also benefits a lot to the tensor flow since it is a old thing okay now what is tsor flow basically so as we know it is a framework for deep learning but if I have to break tensor flow in two parts right I will say tensor and flow okay so in other words you can say flow of tensors flow of tensors now what makes tensor flow so special is there is a concept of tensor flow known as computation graph okay computation I will just show you how that works but just know this computation graph okay and this is the thing that makes tensor flow really really fast now going back to the basics of what is a tensor so in I told you in the pytorch video as well basically an ND ARR you can think of tensor as an N dimensional array in the language of python okay so I'm going to show you one example from my notebook I have I have created one example uh to demonstrate how a tensor will uh travel in the tensor flow okay so suppose this is my tensor okay so I will say my answer is equal to 12 3 this is my tens okay suppose I want to do some operation inside tensor flow framework on this tensor I'm going to explain you what is the meaning of a computation graph okay so with this example so suppose this is my tensor and I want to do some operation on this so how it will flow inside the uh inside the uh framework I'm just going to explain you 123 is the tensor okay let's see this is the tensor suppose this tensor enters okay into the tensor flow framework okay so this I will write here in okay once it enters suppose I want to pass this tensor to a node called prod so just pay attention here guys there there is a node called prod node on this prod I'm passing this tensor 12 and 3 okay and what I'm doing is I am passing this tensor to another node which is a su node okay so here I'm passing my tenser to another node which is a su node okay now I'm calling this this note as B and this note as C just naming naming I'm giving and I'm calling this as a just for example what I'm doing here is what will be the product here 12 into 3 so let me make it the same color basically what will be the product here 12 into 3 36 and what will be the product here uh 12 + 3 15 okay so here I will Define one more node I will call this node as ADD Okay add and what I will get as output is I will get 51 as output through this example what I'm trying to to show you is how this particular 123 tensor flows through the network okay so this concept that I just explained you is called computational graph where nodes is equal to nodes is equal to mathematical operations mathematical operations mathematical operations okay okay and uh ages is equal to tensors okay so as it is clear from this all the edges that you see are tensor this is again one tensor this is again one tensor all the edges are one tensor and nodes are these operations okay so this complete concept is called computational graph and this is how internally tensor flow works now if I have to write write the same thing in Python how I will write that let me show you with with same example in Python okay so I have already written it actually I just want to show you that so first of all I'm installing pip install tensor flow simple I have installed here importing tensorflow HF and print tensorflow version so this is fine no issues now whatever I was doing in the notebook guys the same thing I'm doing here okay so what I'm saying is defining there should be one more n defining and using the graph okay computational graph I'm using what I'm saying here is with tensorflow do comput compet compet I think is standing for computation only V1 do session as says TF do constant I'm defining my tensor here and I'm saying this is my input a Define a tensor okay same thing replicating the same thing that I explained you now okay where is my graph yeah so in the a I'm inputting my 123 okay then I'm defining reduce underscore prod I'm calling that prore b prore b I should I mean don't go by naming just the fundamental concept so I'm Pro producing one uh I mean creating the product and I'm creating the sum two things I'm doing and then both these output I'm taking and I'm just passing it to the uh B and C to the add so so here I'm passing it to the ADD and as you can see here uh it is returning me in the output 51 okay so what I'm doing here is I'm doing the same operation that I showed you through without using any apis through normal tensorflow computational graph so this is how internally it will work okay so here I'm writing the raw code raw tensor flow code okay then I'm running the graph here and getting the result now one important thing to understand here is normally you will not write these kind of codes why because if you remember right you can you can create a website using HTML CSS okay HTML and CSS just to give you an example if I have to create unfold data science website I can go ahead and write an HTML and CSS code or what I can do is I can use a pre-built template of a website and you know give it the flavor of unfold data SCI okay so two ways if I want to create unfold data science website I go and start writing HTML CSS code or easier way for me is I buil a uh I use a pre-built framework right some kind of Wordpress websites or something and I can create my own website right so this bottom part is easier for me similarly if I tell you to write a machine learning model using this way right it's going to be very very difficult for you using this way because everything you need to write by yourself from the raw so generally we don't use this way okay so what we do is internally tensorflow engine will run so here let's say tensorflow engine will run this is your tensor flow layer here your computational graph everything will work as it should work but for the users benefit people have developed some apis and one such API is known as caras which sits on top of tensor flow okay and kasas makes your job easier okay so as a programmer your and mine job will be easier if we use kasas so I'm going to show you an example of how kasas as an API is being used to use tensorflow engine let's see that in Python okay so if I go to python so here you can see import n uh nay pandas same thing tensor flow so then I'm saying from tensor flow import kasas okay so I'll be using kasas now then I'm not going to explain you these normal stuff I'm just importing a data set describing basic stuff only doing some feature engineering that's not much into the context of this video okay just to have some data running okay I am doing this some basic analysis and some you know separating the source and Target what I want to focus more here is this part okay now what I told you is these are deep learning Frameworks so if you remember in my pytorch video I was explaining you how to create a pytorch network right neural network here if you want to create a tensor flow Network right you will say tf. k. sequential so what are you saying to the model give me a sequential Network okay then see here model. add you are saying tensorflow doc. layers. dens means fully connected you give some parameter of your output size you give your input shape and you say what activation function you want to use that's all okay only three things you are saying what output you want you are saying your input size and you are saying what activation function you want okay so you have to pay attention to input output and activation now if I go and follow this link right you will see that exactly same thing that I'm showing you is here okay so this is basically tensor flow official document ation so this exact same thing layers dense output input and you know name is optional so you can see from here it is basically the same thing and then in the end since I'm doing a classification so dense one one layer will come into picture so from here to here is the most important part how do you define a tensor flow model just Define a sequential how many layers you want what is the number of neurons you want and um what you want in the final layer and what activation function you want once you do this your model is defined then you define your Optimizer then you compile your model and you fit your model it's very very simple to do then these are simple stuff once your model is there you get the accuracy Etc and you can print it okay so I just showed you one simple example of um using an API such as kasas right how can you use tensor flow now my question to you is in place of caras I can use other apis as as well can you please comment me which are those apis I can use where tensor flow run in background and I use that API can you comment it comment that okay after that I also want to tell you there are some very interesting stuff in the tensorflow world okay one is known as tensor board another is known as tensor serving tensor board is more for visualization seeing what is going on in the model Etc and tensor serving is more from the deployment point of view and serving your model in the end point Okay so these are slightly Advanced topics but I can create the videos if I see enough interest please drop a comment saying you want video on tensor board and tensor serving I can create that okay before that just drop me a comment on what the question I asked and let me know if you have any doubts on this okay so just to summarize guys we saw what is tensor flow what is a computational graph in tensor flow we saw how to write from scratch without using any package then we used one package and we wrote Our code and then I left you with some uh topics if you are interested we can have more videos on that okay I'll see you all in the next video guys wherever you are stay safe and take care
Info
Channel: Unfold Data Science
Views: 3,615
Rating: undefined out of 5
Keywords: TensorFlow for Beginners, TensorFlow in deep learning, TensorFlow tutorial, Tensorflow project, Tensorflow object detection, Tensorflow developer certificate, Tensorflow full course, Tensorflow python, Tensorflow tutorial, Tensorflow lite, Tensorflow js, tensorflow tutorial in tamil, tensorflow tutorial in hindi, tensorflow tutorial python, TensorFlow tutorial in, tensorflow tutorial playlist, tensfor, unfold data science, unfold data science deep learning
Id: Xjhy-YOiHDs
Channel Id: undefined
Length: 15min 14sec (914 seconds)
Published: Tue Nov 28 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.