Pytorch Tutorial 1-Pytorch Installation For Deep Learning

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hello my name is Krishna act and welcome to my youtube channel so guys many of you had actually requested me to create PI torch playlists completely from scratch so today this is the first video of PI torch where we will be understanding some information about PI torch and then probably I'll also be showing you about the installation how you can actually install everyday I'll try to put at least one video so that at least we'll be able to complete we will try to see some of the important things in PI touch like tensors how we can perform different types of operation how we can perform black propagation with the help of PI torch this is an amazing library all together guys I hope you have used tensorflow Chara's for doing your deep learning stuffs right pi torch is also a very very good a handy tool many companies nowadays are actually using it because it has a lot of advantages it is very very much compatible with Python code you know you will be just be able to just write Python code and with the help of that we'll be able to implement all the things that are necessary in pi torch you know so you'll basically be creating classes you'll be using lot of Hoops concepts in order to do all these things but yes don't worry about it right now we will do completely from scratch we learn most of the things before going ahead guys really want to show you what exactly spy taught so in Python just go and see in Wikipedia it is an open source machine learning library based on the torch library ok so this is basically the library on which on top of it is actually created and it is used for applications such as computer vision and natural language processing again amazing library all together guys I have I've been using from past one month one one and a half months I've been exploring more doing some extensive things you know deep learning things like a n n CN n LST m RN and many more things so it will be very very much funny and you'll be able to do a whole lot of things with respect to that and many people are also saying about the unsupervised machine learning and deep learning probably I'll be using PI tars by pointer and I'll be showing a lot of examples so these were developed by primarily by Facebook AI research lab it isn't free and open source released with under the modified BSD license that basically means if you want to really use it for your industrial purpose you basically have to you you have to use this license on top of that and probably there will be some that you have to actually do okay although Python interface is more polished and the primary focus of development by torch also has a C++ interface so because of this when compared to the other libraries it would be pretty much fast a number of pieces of deep learning softwares are built on pi touch including Tesla who were hugging phase transformer if you know about having phase transformers guys if you know about Burt right a lot of things are there and many people are basically saying that wish why don't you start deep learning from scratch guys I've already created a deep learning playlist in my youtube channel for theoretical stuffs you can actually check there for chaos over there you can actually check I still have need to upload some of the videos like attention models there is transformers there is but I think this this basic things I need to cover over them probably a lot of coding also I'll be doing I'll be completing that but I really wanted to start the PI torch library and I have been working from past two to three months in this extensively so what does pi Tasha actually provides it provides two high level features one intensive computing like numpy so that you know if you don't know about deep learning if you don't know about a NN and all its internally lot of matrix multiplication will be happening right multiplication of inputs weights bias and many more things as such right and you can also create a deep neural network built on tip based automatic differentiation system we will be discussing about that as we go ahead okay now here you can see that Facebook operates both pi Tasha and convolution architecture for fast a fast feature embedding but models defined by the two frameworks who are mutually even compatible so in short they have actually come up with this PI torch and now it is being used XM extensively by everyone so this is just a basic don't worry about automatic differentiation and I'll be just telling you more about it as we go ahead now this is the PI torch dot o-r-g website that you actually have what are the key capabilities you can see over here it is a production ready transitions seamlessly between eager and graph mods with taught script and accelerate the part to production with das so we will be discussing about this because we I'm also going to show you with respect to the deployment it will be really really fun you can go through this particular website and see this if you really want to install just manually PI dot you can we use this you can actually take the stable build you can select your operating system you can select which package you want to basically install Python this is this CUDA okay this is also pretty much important guys CUDA if you have GPUs in your system right and at that particular point of time you know based on the GTX whatever GPU your Nvidia graphics cards you have like suppose if I have GTX one six five zero and the CUDA version of in my case I have actually installed ten point one right using this I can actually use this particular command that is what it actually says but today I'm going to show you a much more easier thing I'll not worry about the CUDA right now okay I already have CUDA in my system and can also show you that CUDA is already present over there but what in this particular video I'll show is that I will try to install not only this pi touch library or torch library itself but instead of that I'll also try to use some other libraries like numpy numpy I'll be using them by pandas see bon mot lips so that I'll be using all together will be creating this pi touch playlist from scratch will create it in a new form of environment will install all the libraries over there so to begin with guys I have a github over here inside this github I have actually created I have actually created one pi Tosh underscore env dot yml file if I just open this yml file guys here I've given my environment name should be env PI torch channels you can see defaults and pi Tosh dependencies what all dependencies library I'm actually covering is basically all these particular libraries ok the PI taught version that I'm using is one point one point zero okay you can use the other version the other version is basically if I just go over here right and if I just go inside this so you can also have one point five point one okay if you really want you can also check with that let me do one thing let me just write it at one point five point one okay this is the latest build probably that is actually available right now what I'm going to do is that this is just like a requirement or tht file guys okay in requirement txt what we do is that we just put all the dependencies library right so if I show one example over here this is how I all the recommend requirement dot txt how I put all the libraries but this time this is the first time that I'm showing you in the form of yml file this is just to give you some additional knowledge you can also create a requirement or tht put it put all these particular libraries or not but in that particular case first of all you need to create a environment and then you have to basically install all your library separately that I have already shown in my previous video but what if if I have an yml file how should i basically install it okay so this yml file I have over here now what I'm going to do quickly is that first of all I'm just going to save it I have all my versions I'm using Jupiter notebook also over here and I will also use some kind of Jupiter notebook the Python version is three point seven point three Seabourn is this guy Katelyn is this if you want to also improve your sky Caitlin let's see which is the latest sky Caitlin version so I'm just going to write it as sky Caitlin recent version okay latest version all the recent version I think it is 0.23 0.1 I am just going to use this 0.23 point one so that I will be able to use it with from the latest version itself okay just to keep some of the things I have just done it guys but it is up to you whatever version you want to use make sure that you can put all those things right now what I'm going to do over here is that I will just go and open manaconda prompt so here is my anaconda prompt you can see that I'm in the same working directory where my yml file is actually present okay so where my actually yml file is actually present so what I'm going to do is that first of all you can see if I write dir over here alright I can see my PI torch underscore env dot yml file is actually present now if I want to install this because understand inside this you have a Python environment okay so you can see that what kind of environment it is it is basically going to create the environment name as env pi torch and then it is going to install all these particular libraries so what I'm going to do over here is that I just go and write one Khanda prompt remember for this you require anaconda okay this is the process of doing in anaconda and everything everybody I think everybody has anaconda environment and as the Anaconda tool itself right so here I'm basically going to write the command as Conda env create minus F okay pi torch underscore e NV dot yml okay so when I write this particular command make sure guys that particular file should be present that yml file should be present so am I writing Conda env create - f PI torch under so NV dot yml now once I press enter automatically it will create the new environment it will create a new environment and to start installing all the packages that are basically required okay so here you can basically see how the installation is actually taking place okay so we'll wait for some time till the installation takes place then probably the new environment that is env PI torch will get created so we'll wait for some time let me just fast forward it if you really want okay I will just be fast-forwarding it for some time you so guys the installation has I actually take in place in order to verify the installation what I'm going to do is that I'm just going to activate the env PI torch so so guys now I have actually activated the env PI torch which I have actually installed by just writing Conda activate env PI torch now after this I will basically want to check whether my libraries are actually working fine or not so I'm just going to write Python and inside this what I'll do is that I'll import torch once I input torch I will see that it has got executed fine then what I'm going to do is that I'm just going to check out the version which was present inside that once executed the version is one point five point one remember guys I have already done the setup of my GPU in my system where I've installed the right compatible libraries of CUDA and CUDA CNN library itself so probably if I were to check whether this torch or this particular setup is working fine with my GPU or not I can basically check by just writing torch dot CUDA dot write is underscore available so if I write like this you'll be able to see that it is saying through that basically means my setup is correct if you don't know about the setup guys just go and check in my deep learning playlist there I've explained you about that how to do the installation how to install the write compatible CUDA and CUDA CNN over there how to put up the path in the environment variable everything I've explained but still if you if this is coming as false right that basically means you first of all you don't have a GPU if you have a GPU probably that particular set up is not ready but don't worry as I told that I'll be starting this particular playlist completely from scratch everything will get covered in the future I'll be explaining you about how you can actually use the GPUs also now let me just find out more information about my GPU like what is the device ID what is my GPU name so for that I will just write torch dot CUDA dot current underscore device so this this will actually help me to get the device ID so this is my GPU device ID that is zero so if I write my device name if I want to really get my device and so what - I will just write torch CUDA dot get underscore device right and if I execute it okay I think I should basically be writing get underscore device name sorry for that okay so get underscore device name and here I have to give my ID so here it is basically saying that okay it is geo force GT x165 0 that is my laptop GPU and then apart from that if you really want to check that how much memory is also being elected suppose if I really if if if some of my program is actually using GPUs by using this torch so I can also use GPU torch dot CUDA dot memory underscore allocated to check how much memory is basically allocated so here it is basically saying 0 because since I have not run any code now after this guys you know I am already in that location of Pi torch I'm just going to clear this screen and here I'm basically going to say Jupiter notebook to launch my Jupiter notebook and if you remember guys I have installed Jupiter notebook separately in that particular environment itself so here is my untitled my py and B file which I had that recently created in here you can see that if I import torch and see my torch version it is also showing correctly absolutely fine now this was the basic installation type what I will be doing is that the yml file I'll be committing over here ok once the yml file is available this yml file you can basically take this download that run from this particular github repository and probably what you can do is that you can actually you know install it in your local so what i'm going to do is that quickly i'm going to commit it over here in front of you so let me just go into my d drive okay machine learning and dl projects let me just go to that particular working location where i have been continuously creating fight watch videos of that particular folder will be put up everything inside this right so everybody can actually use that so what i'm going to do is that i'm just going to drop that file over here once i drop this particular file you can actually download it from there the link will be given in the description you just have to do and follow all the steps that I've actually told and probably you will be doing lot of things lot interesting things we'll play with tensors we will try to see how to do back propagation we'll be doing a lot of things guys it will be pretty much amazing then we'll also try to implement a and n CN n RN N and various things as such one important thing I've also started exploring unsupervised deep learning projects and probably with the help of torch I was able to do a whole lot of things yes guys this was all about this particular video I hope you like it please do subscribe the channel if I'm not already subscribed see L in the next video have a great day thank you one and all bye bye
Info
Channel: Krish Naik
Views: 60,367
Rating: undefined out of 5
Keywords: pytorch tutorial pdf, pytorch tutorial for beginners, pytorch examples, tensorflow tutorial, pytorch computer vision tutorial, deep learning with pytorch, pytorch documentation, pytorch projects for beginners
Id: U0i7-c3Vrgc
Channel Id: undefined
Length: 15min 1sec (901 seconds)
Published: Sun Jul 12 2020
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.