Deep Learning on the Cloud - GPU TO LEARN FASTER
Key Takeaways
Training deep learning models on the cloud using Amazon EC2 and leveraging GPU computation power with tools like TensorFlow and Jupyter Notebook
Full Transcript
some of you watching this video might just be breaking into the fields of machine learning or deep learning others may have some knowledge of executing models through packages like scikit-learn and some of you may even know about deep learning frameworks like Karros with the tensorflow Theano or c NT k backend regardless of your experience if you've ever trained a model on your computer you know that it can take a while like a really long time this is especially true for training neural networks because of the sheer amount of data we need for training computers take a lot of time because it only uses the CPU for performing millions of mathematical operations nowadays this task can be extended to other parts of our computer specifically the GPU GPUs were traditionally used for gaming and video rendering but we also find it useful in training models for deep learning some computers may come with built-in GPUs but they're probably enough just to render basic graphics kind of like iris on MacBooks or Nvidia on window PCs and laptops the latter being more powerful nine out of ten times this processing power is still not enough to train models with all the data that is required by many problems and even for models that can be trained the training is very slow I'm making this video because I ran into a problem not too long ago I wanted to train a DC again to generate some digit images using the Emnes data set I wrote a program and it worked but there was a problem it was training slow like very very slow it would take a significant amount of time to train the CNN and addy convolutional network over 3,000 iterations chances are it would have taken an entire day to train this hello world model with again imagine the time I would have taken to train a really complicated model with a really large data set it's crazy one way to solve this problem like I said is to use GPUs you could get an external GPU and configured for your computer but GPUs are several hundreds of dollars and you'll have to deal with the hardware maintenance nowadays technology advances you fast to keep track of it what'd you buy today will probably be obsolete next year furthermore I'm on a Mac and I saw this concerning message about tensorflow GPU support and how it would discontinue at version 1.2 so this led me to another option using the cloud so in this video we're gonna talk about the steps we need to take to get an ami instance up and running for training your large models in Amazon's ec2 a lot of words yeah but I'll explain everything you first need to create an account the link to this page will be down in the description below it'll ask for basic information including credit or debit card info make sure you choose the developer account which is $29.99 at the time of making this video the free basic account doesn't allow you to access as many resources you might as well just run the programs on your own laptop once logged in you should see a console page that looks something like this what do you want to do from here is search for ec2 easy to by the way stands for elastic cloud compute this will link you to the dashboard you can do a lot of stuff here but I'm only going to go through the essentials to get you up and running with an a my instance Amazon does well explaining themselves here so you can come back to it when you have time for now click on the limits link you'll see the available instances and their capacities you have in the current plan which is at least developer I hope I'm running you through this section because when I first set up my account the first thing I wanted to do was launch an instance and get my program running really late in the instance setup I realized that it kept failing because I didn't see this page I know I've been throwing the terms instance an ami a lot so a few words on this before I actually continue basically Amazon provides many services one of which they call Amazon Elastic cloud compute or Amazon ec2 as soon as you hear the word cloud you're probably gonna ask a question about what kind of cloud service model is it this particular service is an infrastructure as a service so why is that I say so because the underlying hardware and store which is abstract it from the user but the user has control over operating system resources like setting up a virtual machine for example this distinguishes it from a pass a platform as a service and obviously a software as a service a SAS now in this infrastructure they provide something called a Mis Amazon machine images an ami is basically a virtual appliance and like any virtual appliance ami consists of a template which is a layout of an operating system and a software configuration this is used to generate virtual machines also known as instances we can generate many instances from a single ami okay we got that theory out of Hawaii on this Limits page each instance listed provides different resources and different amounts of resources in the free tier for example you have access to create a t2 micro instance t2s are typically used for general CPU computations it's already available to you so you can just begin launching an instance in my opinion your laptop may already have more computing power and so you're better off training these models on your laptop what we need now is GPU computation power and this is provided by p2 instances one problem though is that they're not immediately available to us so I cannot just say create a p2 x-large instance right off the bat we need to request for a limit increase on this resource so why does AWS do this the idea is to protect their infrastructure and ensure that their clients only use what they need to use and want to use if there were to say grant 10 of these p2 instances from the get-go then you would be compelled to use all of them utilizing all these resources would cost them thousands of dollars well no matter when putting forward a request usually they deal with it pretty quickly it may take a few hours for them to send a response and another day or two to actually grant the request though once the limit instance is taken care of you'll see the update on the page let us now see how we can generate this instance go back to the dashboard and click Launch instance by this we mean creating a virtual machine instance now we just have to follow a sequence of seven steps will first choose the AMI every ami listed here has the name as well as when you want to use it since I want to perform deep learning with Carolyn tensorflow I choose the deep learning AMI Amazon Linux version 3.0 next we determine the type of instance we want this ami to generate remember we need GPU computation power so it makes sense to choose from that family alone we choose the p2x large instance and click review and launch if everything is okay here then click launch now we create a key pair and download it as a dot PEM file you if everything is looking good QlikView instances on the bottom as a first-time user you will only see one instance running now to use the instance will need to remotely log in go to the terminal and enter the directory where you have the key pair file downloaded first off change the permissions of the file to be slightly more restrictive I changed it to 600 so only the file owner can read and write to this file next type in the secure shell command where we'll be using port 8080 d8 type the name of the key para file followed by the user and the public IP address of our ami instance once we're in start an environment with tensorflow and caras and khuda' for GPU utility you we are now ready to code let's open a Jupiter notebook and execute the digit recognition model for the Emnes data set this is a built-in test program already available to us so there's really no need to code just execute the cell if you're using GPU computation instance you'll notice that the program execution speed is several times faster than that on a local machine you can see why we use this now when you're done remember to stop you're launched incense so you're not charged when it's not in use and that's how we train a deep learning model in the cloud hope this video helps you get started with launching instances in Amazon's easy too if you liked the video hit that like button and subscribe for more awesome content oh and sharing is caring so share the video and I'll see you in the next one bye bye
Original Description
We talk about how you can train your models on the cloud with a p2.xlarge instance, leveraging GPU computation power. If you like the video, like and SUBSCRIBE to the channel for more amazing content!
LINKS
Create an account: https://aws.amazon.com
Instances & AMI: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instances-and-amis.html
Watch on YouTube ↗
(saves to browser)
Sign in to unlock AI tutor explanation · ⚡30
Playlist
Uploads from CodeEmporium · CodeEmporium · 4 of 60
1
2
3
▶
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
Linear Regression and Multiple Regression
CodeEmporium
Logistic Regression - THE MATH YOU SHOULD KNOW!
CodeEmporium
Generative Adversarial Networks - FUTURISTIC & FUN AI !
CodeEmporium
Deep Learning on the Cloud - GPU TO LEARN FASTER
CodeEmporium
Deep Mind's AlphaGo Zero - EXPLAINED
CodeEmporium
Mask Region based Convolution Neural Networks - EXPLAINED!
CodeEmporium
Attention in Neural Networks
CodeEmporium
Depthwise Separable Convolution - A FASTER CONVOLUTION!
CodeEmporium
One Neural network learns EVERYTHING ?!
CodeEmporium
Neural Voice Cloning
CodeEmporium
AI creates Image Classifiers…by DRAWING?
CodeEmporium
Unpaired Image-Image Translation using CycleGANs
CodeEmporium
K-Means Clustering - EXPLAINED!
CodeEmporium
Random Forest Classification
CodeEmporium
Data Science in Finance
CodeEmporium
Hypothesis testing with Applications in Data Science
CodeEmporium
A/B Testing - Simply Explained
CodeEmporium
The Kernel Trick - THE MATH YOU SHOULD KNOW!
CodeEmporium
Support Vector Machines - THE MATH YOU SHOULD KNOW
CodeEmporium
Principal Component Analysis (PCA) - THE MATH YOU SHOULD KNOW!
CodeEmporium
History of Calculus - Animated
CodeEmporium
Curiosity in AI
CodeEmporium
DropBlock - A BETTER DROPOUT for Neural Networks
CodeEmporium
Autoencoders - EXPLAINED
CodeEmporium
Recurrent Neural Networks - EXPLAINED!
CodeEmporium
LSTM Networks - EXPLAINED!
CodeEmporium
Building an Image Captioner with Neural Networks
CodeEmporium
10 Machine Learning Questions - ANSWERED!
CodeEmporium
How do neural networks work?
CodeEmporium
Evolution of Face Generation | Evolution of GANs
CodeEmporium
How does Google Translate's AI work?
CodeEmporium
How to keep up with AI research?
CodeEmporium
How does YouTube recommend videos? - AI EXPLAINED!
CodeEmporium
Variational Autoencoders - EXPLAINED!
CodeEmporium
Logistic Regression - VISUALIZED!
CodeEmporium
Gradient Descent - THE MATH YOU SHOULD KNOW
CodeEmporium
Boosting - EXPLAINED!
CodeEmporium
Transformer Neural Networks - EXPLAINED! (Attention is all you need)
CodeEmporium
Loss Functions - EXPLAINED!
CodeEmporium
Optimizers - EXPLAINED!
CodeEmporium
NLP with Neural Networks & Transformers
CodeEmporium
Batch Normalization - EXPLAINED!
CodeEmporium
Activation Functions - EXPLAINED!
CodeEmporium
Data Scientist Answers Interview Questions
CodeEmporium
Why use GPU with Neural Networks?
CodeEmporium
How do GPUs speed up Neural Network training?
CodeEmporium
BERT Neural Network - EXPLAINED!
CodeEmporium
ConvNets Scaled Efficiently
CodeEmporium
Transformer Neural Net makes music! (JukeboxAI)
CodeEmporium
What do filters of Convolution Neural Network learn?
CodeEmporium
We're hosting a Machine Learning Conference!
CodeEmporium
MLconfEU 2020: Machine Learning Conference for Software Engineers
CodeEmporium
Are Neural Networks Intelligent?
CodeEmporium
Time Series Forecasting with Machine Learning
CodeEmporium
Few Shot Learning - EXPLAINED!
CodeEmporium
How does a Data Scientist Fight FRAUD?
CodeEmporium
How would a Data Scientist analyze Customer Churn?
CodeEmporium
Expectations with Machine Learning
CodeEmporium
Why Logistic Regression DOESN'T return probabilities?!
CodeEmporium
How you SHOULD code Machine Learning
CodeEmporium
More on: Supervised Learning
View skill →Related Reads
📰
📰
📰
📰
What Is an MCP Registry? (And the NxM Problem It Solves)
Dev.to · Sahajmeet Kaur
Built a suite of client-side dev tools to fix the "production data" privacy gap
Dev.to · Rayan Ahmad
5 Best BrowserStack Alternatives to Optimize Your Testing Infrastructure
Medium · DevOps
️ The Lifecycle Symphony: A Senior SRE’s Deep Dive into Init and Sidecar Containers
Medium · DevOps
🎓
Tutor Explanation
DeepCamp AI