Google Colab Tutorial for Beginners | Get Started with Google Colab

261.25k views2048 WordsCopy TextShare
Doga Ozgon
In this tutorial you will discover all the basics you need to know to get started with Google Colab....
Video Transcript:
google collaboratory or caller for short is the best way to get started with artificial intelligence and data science everything you need all the major libraries and tools are already pre-installed for you and pre-set up for you so by the time it takes you to search how to install another software you can already be get up and running coding your data science and artificial intelligence code with google call up you can write run and share python code in your browser and this allows you to get started from your phone tablet or laptop without any configuration and
you can immediately share your code with anyone with a simple link and everything you do in call app will be saved under your google account so you can access them share them just like the rest of your files under your google drive if you are familiar with the jupyter notebooks google collab is essentially a jupiter notebook hosted on google servers with additional functionalities that makes it especially popular among data science artificial intelligence communities so without further ado let's go ahead and get started with call up so first thing you want to do is to search
for google call up and it should be the one that says callup.research.google.com let's go into that so the very first thing you should know about google call up is that everything is organized under notebooks so first thing you see when you come to the website are basically your recent notebooks and the first one you will see will probably be the welcome to collaborator notebook so to get started first thing you want to do is to go ahead and create a new notebook so the first time you open a collab notebook it will name it for
you with untitled 0 in this case it is 3 for me and one thing you want to do is to rename this notebook so that it's more meaningful to us it can be something like collab intro tutorial since many times you'll be working with multiple notebooks at a time it can be really helpful to appropriately name your notebooks so if you come back to it months after writing it it will be descriptive and much easier for you to know what what you were doing in that notebook and everything i do in this notebook will be
saved to my google drive under my google account so when first we take a look at google call up the first thing we will see and the major thing we will see is something called a code cell and a play button we can go ahead and write some python code here and it will be executed not on our laptop but it will be run on google servers and currently we are not connected at servers but we don't have to click here to be connected but instead usually what you want to do is to write some
code here and it will be automatically connect to google servers so let's write a simple python code now there are a couple ways i can run this code first one and the default one is to click on display button and we just ran our first python code usually you'll want to use keyboard shortcuts and the shortcut to run a single cell is command enter which does the same thing as clicking on that play button but most of the time chances are you'll want to run a call cell and create a new call cell under it
so you can keep coding to do that we will use shift enter which i just did notice that there are two type of cells i can create one of them is a code cell and this is where we write our code another one is a text cell so although it says text cell text is not the only thing we can write here once you write some text using the icons above we can turn it into bold italic title as well as other features such as images or videos lists and bullet points and there's actually even
a language for that called markdown language and as you're getting started with collab it's not necessary to learn markdown language but if you are interested you can do that especially later on in your artificial intelligence or data science journey for now what you should know is that we can create code cells that are modular and we can also use text cells to make more explanations or display images that will be helpful and maybe explain our code better with some rich text formats so when we write code inside code cells we said that it's not running
in our own laptop but it's running at google servers and there are actually three types of servers that google can allocate to us and we can change it from here if you go to runtime and change runtime type you will see that you have the option to have a hardware accelerator right now by default you are not given a hardware accelerator but if you need one it's possible to have either a gpu or a tpu so why would you need them if you're just getting started and writing python code or simple machine learning code that
runs fast enough most likely you'll be fine with the default version which has no hardware accelerator meaning that it will run on cpus but as your artificial intelligence code gets larger and more complex as you do more operations that operations you make will take more time and you'll want to use some kind of hardware accelerator and the most common hardware accelerator is a gpu and we have access to free gpus within collapse one thing you will notice is that when you change the hardware accelerator type from num to gpu or a tpu it will basically
tell you that if you don't need a hardware accelerator do not use a hardware accelerator and this way google can allocate its gpus or tpus to people who need more computational power for now i'm just writing simple python code so i can change it to none one thing you should know is that when you leave your notebook unused for hours your notebook will be disconnected from google servers to more efficiently allocate its resources but do not worry when that happens all of your code will be still safe and nothing changes on them but you will
need to rerun your code and to do that you can also do it from runtime and run all so we talked about cpus and gpus that you can connect to but there's also another one which we can access from change runtime type and hardware accelerator and that was tpu and tpus are tensor processing units and do not be scared by the name these are basically processing units or processing chips that are specifically designed for significantly accelerating artificial intelligence code and we also have free access to them from cola and this can be especially useful if
you have larger machine learning models or artificial intelligence models but if you are using a smaller model you will be most likely fine with a gpu or none hardware accelerator so until now we just seen python code but we didn't see anything about data science machine learning or artificial intelligence code but one of the major advantages of using google colab is that you can't only code python code in the browser but all of the major data science and artificial intelligence libraries and tools come already pre-installed in collab and we can start using them with import
statements such as so in order to use tensorflow numpy pandas matbaltip and pytorch and many more of them since they're already pre-installed for us we can start using them with these import statements and if you want we can also check their versions and as you can see we're using the latest versions of the libraries such as using tensorflow 2.4 which is the latest one as of right now and if you're not familiar with any of these do not worry as you get started with colab it will be much easier to learn them as you're coding
them so as you are getting started you are not required to know what this code does or whether these libraries are about and you can learn them one video at a time and every now and then you will want to use libraries that are not inside collab and when you want to do that you will want to prefix your code with an exclamation mark and with that you can install other libraries to call up as well and when you want to use them you can start using them with import statements as well so as you
are working within a notebook if you want to create a new notebook you can do that from file and new notebook and similar notebook actions such as opening the existing ones you can also do them from here as well a lot of the times many of the machine learning data science or artificial intelligence codes are written in collab and when you're learning from them one thing you want to do is to save a copy in drive and when you save a copy and drive you can have a copy of the tutorial and save it under
your google drive as well and if i do that i will have all the code from that previous notebook except in this one i'm not connected which i can connect in a second as well and i will have this title change to a copy of follow-up intro tutorial from collab info tutorial and if i wanna run this code you can either run that code cell by cell or you can run that from runtime and run all which will run all the cells sequentially and that's one of the reason why collab is so popular among data
science and machine learning communities and you can find ldap tutorials are written in collab for ease of shareability because you can literally share them with a single link and everyone that has an internet connection and the google account can have access to that code and run them themselves as well as modifying it and if you want to download the notebook you can also do that from here under file you can go download this notebook as a ipnb file which is what we are using here and you can also download it as a python file one
thing you should know is that currently we're working with the ipad b file and this is the same file format that you use in jupyter notebooks and ipamb files are more popular with data science and machine learning because they have additional capabilities on top of python files some of those features are called cells which you can save your outputs of the code cells you can also change the order of the code cells more easily from these up or down arrows you can delete them comment them and they're overall in a more modular structure that are
a better fit for data science and machine learning code so these were everything you needed to get started with google collab as you just have seen you can just search for google call up and get coding within seconds without any setup and everything you do will be saved under your google account and you can reach them from your google drive and share them with a single link so this was it for this tutorial if you learned better by reading by the way i also have this tutorial in article format as well and i will make
sure to put a link to it in the description box with that i hope you got some value out of this video if you want to see more machine learning and artificial intelligence tutorials make sure to like and subscribe and i will see you next time
Related Videos
Complete Beginner's Tutorial to Google Colab
18:12
Complete Beginner's Tutorial to Google Colab
Greg Hogg
25,616 views
TensorFlow Tutorial For Beginners | Deep Learning with Python
14:08
TensorFlow Tutorial For Beginners | Deep L...
Doga Ozgon
24,482 views
Google Colab Tutorial for Beginners | What Is Google Colab? | Google Colab Explained | Simplilearn
12:49
Google Colab Tutorial for Beginners | What...
Simplilearn
35,791 views
How ChatGPT Built My App in Minutes 🤯
8:28
How ChatGPT Built My App in Minutes 🤯
Website Learners
2,822,831 views
Introduction to large language models
15:46
Introduction to large language models
Google Cloud Tech
755,969 views
Watching a Rocket Launch at SpaceX with Elon Musk!
11:40
Watching a Rocket Launch at SpaceX with El...
Kai Trump
2,592,112 views
Jupyter Notebook Complete Beginner Guide - From Jupyter to Jupyterlab, Google Colab and Kaggle!
25:12
Jupyter Notebook Complete Beginner Guide -...
Rob Mulla
337,534 views
How I'd Learn AI (If I Had to Start Over)
15:04
How I'd Learn AI (If I Had to Start Over)
Thu Vu data analytics
870,216 views
Git and GitHub Tutorial for Beginners
46:19
Git and GitHub Tutorial for Beginners
Kevin Stratvert
1,440,894 views
How I Would Learn Python FAST in 2024 (if I could start over)
12:19
How I Would Learn Python FAST in 2024 (if ...
Thu Vu data analytics
563,065 views
Google Colab Tutorial for Beginners (2022) | colab.research.google.com | Amit Thinks
34:02
Google Colab Tutorial for Beginners (2022)...
Amit Thinks
72,109 views
Python for Beginners - Learn Coding with Python in 1 Hour
1:00:06
Python for Beginners - Learn Coding with P...
Programming with Mosh
19,607,098 views
Git Tutorial For Dummies
19:25
Git Tutorial For Dummies
Nick White
1,254,757 views
Google Colab Introduction For Machine Learning
13:28
Google Colab Introduction For Machine Lear...
NeuralNine
29,523 views
Google Colab Tutorial for Beginners | Using google Colab for machine learning and Deep learning
14:41
Google Colab Tutorial for Beginners | Usin...
Unfold Data Science
111,850 views
How to Set up VS Code for Data Science & AI
22:53
How to Set up VS Code for Data Science & AI
Dave Ebbelaar
327,434 views
👩‍💻 Python for Beginners Tutorial
1:03:21
👩‍💻 Python for Beginners Tutorial
Kevin Stratvert
3,422,496 views
Google Colab Tutorial for Beginners | What Is Google Colab ? | Google Colab Explained | Simplilearn
13:23
Google Colab Tutorial for Beginners | What...
Simplilearn
108,369 views
Lecture 1: Introduction to CS and Programming Using Python
1:03:30
Lecture 1: Introduction to CS and Programm...
MIT OpenCourseWare
864,666 views
OAuth 2.0 and OpenID Connect (in plain English)
1:02:17
OAuth 2.0 and OpenID Connect (in plain Eng...
OktaDev
1,804,801 views
Copyright © 2024. Made with ♥ in London by YTScribe.com