What you'll learn
- Compare rule-based AI, machine learning, deep learning, and prompted AI by how each system gets its logic
- Distinguish regression from classification and match common algorithms such as linear regression and logistic regression to each
- Explain how deep learning neural networks adjust weights across layers during training epochs, using the MNIST handwritten digits example
- Identify deep learning use cases in computer vision and natural language processing, including sentiment analysis
- Describe how generative AI and multimodal models accept and produce text, images, audio, and video
- Outline the layers of an ML solution from choosing tools and libraries through model training to application deployment
Free 52-minute video lesson with a full transcript and knowledge checks. No account needed to watch.
Introduction
Welcome to the next skill in the AWS Certified AI Practitioner Course! In this skill, we'll Compare AI with Machine Learning and explore how rule-based system are not machine learning—but they are both considered AI. We'll explore the subdomains of AI: machine learning, deep learning, and generative AI.
AI vs Machine Learning
Now that we've covered cloud versus local and core AI concepts and tools we'll begin to compare AI versus machine learning by asking the question: Is AI the Same as Machine learning? See you in the video!
Knowledge Check
Which type of AI is used in facial recognition systems?
What is Machine Learning?
In this video, we'll answer the question, What is Machine Learning? As we explore and demystify machine learning we will unpack concepts like regression, classification and rule-based AI.
Knowledge Check
What is the primary difference between machine learning and rule-based AI systems?
Deep Learning Explained Simply
In this video, we'll explore how Deep Learning is really just software modeled after the brain. We will analyze artificial neural networks in simpler terms to give you the intuition you need to understand how you can use to build your own models—from object detection to sentiment analysis.
Knowledge Check
What is a key requirement for deep learning to work effectively?
Recognizing Handwritten Digits
In this video, we explore how Deep Learning can recognize handwritten digits by learning to detect different patterns, such as lines and edges. We begin by passing in an image with a number that travels through a neural network to ultimately make a prediction. As Arthur C. Clarke said, "Any sufficiently advanced technology is indistinguishable from magic". Let the magic begin!
MNIST Digits Dataset:
MNIST Fashion Colab Notebook:
Knowledge Check
What is the primary purpose of the first layer in the neural network when analyzing the MNIST dataset?
What is Generative AI?
In this video, we explore one of the most exciting parts of artificial intelligence—Generative AI. Instead of just analyzing data, Generative AI creates brand new content like text, images, and even music. We'll explore the powerful foundation model behind transformers, diffusion models, and the multi-modal model driving tools like GPT–4o.
Links:
Knowledge Check
What is a key advantage of the transformer architecture in generative AI models like GPT?
Challenge 🎉
Congrats on making it to the end of the skill and to the challenge! Your challenge is to leverage the power of generative AI to learn more about the transformer architecture:
1. Search for the white-paper titled "Attention is All You Need" and download the PDF.
2. Upload the white-paper PDF to Google's Notebook LM.
3. Create a podcast to learn all about the self-attention mechanism.
Solution
Knowledge Check
What is the primary focus of the white-paper titled 'Attention is All You Need'?
Knowledge Check
Which of the following statements best describes machine learning?
Knowledge Check
Which of the following is considered a subdomain of AI?
View Transcript
Introduction
0:00Hello and welcome to the next scale in the AWS Certified AI Practitioner course . In this scale, we're going to compare AI with machine learning. Up to this point, we've talked about cloud versus local and all of the related AI core concepts and tools. Now we'll begin to compare AI versus machine learning and we'll do that by asking is AI the same as machine learning.
0:31And in this scale, we'll break everything down and explore AI in its different subdomains at a deeper level. But first, let's talk about everything we're going to cover in this scale. Number one, we're going to talk about AI versus machine learning and really ask what is the difference. Then we'll talk about real world AI and we're going to do that with use cases again. This time, we're going to compare it to the subdomains. Now we need to understand what is AI, generally speaking, what is machine learning and what is deep learning and what is gen AI.
1:07These are all important subdomains and we need to start to understand where they fit into in the real world of AI. Then we'll dive into deep learning and explain it simply. We've talked about it in the context of software modeled after the brain. This is also what we described as software 2.0 because it learns from data using neural networks. And next, we'll dive into how AI recognizes handwritten digits. There's a lot to talk about when we're talking about CV and what is that?
1:40Computer vision. If you remember, we said CNN, that's part of computer vision and we'll talk about that with some amazing visualizations. In number 5, we're going to talk about generative AI, also abbreviated as gen AI and how machines create text, images and more. And then we're going to really just tie it down with humans plus AI, which is prompting software 3.0 and the future. And then number 7, I'm just going to put it up here.
2:11This is the challenge just to make sure that we don't have any knowledge gaps and that we understand all of this as we start to get more granular and start to talk about deep learning more of the neurons or the deep layers and then computer vision. So the way I like to think of it as NLP or natural language processing is how we teach the computer to read and write. And then computer vision is how we teach the computer to see the world.
2:41So number 6, when we get into the humans plus AI, it's a great tool, I would say, to think about all of these deep learning concepts as if it were in your mind. Because we do have biological neural networks and you can think about computer vision, you can think about NLP. And I think it's a really great way to internalize these concepts. If it feels alien at all, always just remember there's a biological version inside of you. All right, so I'll see you in that next video, AI versus machine learning.
AI vs Machine Learning
0:00Welcome back. We already know that AIs a field that creates systems that mimics human intelligence or you can think of it as software modeled after the brain. And these systems, much like human minds can perceive, think of cameras seeing like eyes, reason, chess playing AI or AlphaGo beating the best Go player, and learning when we say learning, we mean learning from data and rules. Also, they can solve problems and make decisions. Artificial intelligence is a field of computer science focused on building systems capable of performing tasks typically that require human cognitive abilities. And remember, we talked about software 1.0, 2.0, and 3.0.
0:45Those are all inside of this main term artificial intelligence. And I think we have a good understanding of what AI is. But first, let's expand on the AI use cases, because I'd like to make sure that we understand which type of use case is using which type of artificial intelligence. So let's start with computer vision. Computer vision is using AI to analyze images and videos. And you can think of video as a series of images. If you know what 24 FPS means, that means 24 frames per second.
1:21And that's normally how many frames per second that we see when we're watching movies. So they're 24 images. So if you think of it like that, computer vision is really just working with images. It can be one at a time or many in a series. So what kind of machine learning do you think this is? Let's break it down. It extracts patterns like edges, textures, and objects from pixels. It's using autonomous cars to detect lanes, signs, and pedestrians. And neural nets process video frame by frame to make driving decisions. Again, it's set frame by frame. But I think the takeaway here is that we said neural nets. So if you said that this was deep learning, then that's correct.
2:03No logic, just learning from the data. All right. So now how about facial recognition? Here, AI identifies and matches human faces. You've probably seen movies where they're trying to find somebody and they look at all the public camera feeds. So what kind of AI is this? Let's talk about how it works. It converts facial features into numerical factors called face prints. These are then compared using cosign similarity or nearest neighbors. These are again algorithms.
2:36And this is used often to unlock phones, right? It looks at your face and you can unlock your phone with the face. Airport security to find people that are not supposed to be in the airport and even surveillance systems. So what kind of AI is this? If you were thinking about face images and convolutional neural networks, neural nets that is correct, this is also deep learning. All right. So now how about raw detection? Here AI spots abnormal behaviors in transactional data.
3:06Here, we're using models like decision trees or random forests or others called XG boost and all of these learn spending patterns. Remember that we looked at a random forest earlier? That might ring a bell. They flag transactions that differ from normal patterns. That means automates, weird times or strange locations. For example, let's say that you bought a pizza, you 're in New York City, and then 15 minutes later, someone in China bought a Tesla. Well, probably not the same person, right? You went from a pizza to a car in a completely different continent. So that might be something that gets flagged and they don't need images, just structured tabular data. So that's the clue. In this case, this is traditional machine learning, also software 1.0 , because you are writing the logic, you are writing the code. All right. So now let's move to ID P or intelligent document processing. This is a little bit trickier. Let's try to think through it. AI extracts text and meaning from form and it's using something called OCR. This is optical character recognition.
4:13What it's doing is recognizing the characters and it's converting scanned images to text. In short, it transforms messy documents into clean, usable digital records. All right. So this is interesting because it's a mix of deep learning plus machine learning. Let me explain how this works. So the deep learning is for the image in text parsing, and then the machine learning is for classification and tagging. So the OCR uses deep learning to convert scanned images to text, then the machine learning part, which can also be rule based systems, labels, fields like dates, totals, and names. So what it's doing is combining both deep learning and machine learning. So here's the last one, robotics. What do you think? Well, the difference between computer vision and robotics is very similar because it's using computer vision to navigate the real world.
5:11And so this is much harder than chat GPT deep learning again is used for robotics. And so what's the takeaway? They all use some kind of AI, but now we know which are using which. And also we know that they could be mixed. Now let's talk about the AI system layers, also known as AI components. So let's start at the bottom here with a data layer. So here's where we have the data and the data scientist. This is where we collect, store, and organize structure and unstructured data.
5:44These are data structures. There's different kinds. And so these are the two that we're going to really focus on in this skill. So what does a data scientist do with the data? Well, you have to frame a problem and try to solve a problem, but using machine learning in this case, that's the framework layer. Do we want to use deep learning and in TensorFlow and PyTorch? Or are we going to use traditional machine learning and algorithms using scikit learn? So we choose the tools, libraries, and algorithms for the development of the model. And then we move into the model component. And here we train and define the model architecture. We do some tuning and loss functions to get the model to be performant. We want to increase the performance as much as possible. We really want to minimize error and maximize orments. So builds, trains, and tests the machine learning model. And finally, we have the application layer. And that's where users can access the model. So we deploy the train model for real time or scheduled use.
6:48So these are the ones that I'm checking that are important. Let me just put asterisks here and here. We're going to revisit these to real quick note on the application layer. There's two ways that we can handle this application layer that can be an API where two computers are talking to each other or UI user interface where someone is using a website or mobile phone or an interface directly for users. All right. So that's it for this video. And I'll see you in the next video where we answer the question, what is machine learning?
What is Machine Learning?
0:00Welcome back. In this video, we're going to talk about machine learning and how machines learn from data so that we can compare it to rule-based systems and how Rule-based AI is not machine learning. One is a rule-based system and the other one learns from data. All right, so we know that machine learning is a subset of AI that learns patterns from data instead of being Explicitly programmed it improves over time and it can make predictions. For instance, instead of following hard-coded rules Machine learning learns from examples. They use past data So we're talking about historical data to recognize patterns and make predictions Machine learning is a part of AI focused on learning from experience So we're going to dive into regression here in classification to further illustrate these differences and the process relies on statistics There is programming, but it's using statistics and to clarify this. We're not using logic to find these patterns We're using statistical programming. So first of all, what is regression regression predicts continuous numerical values?
1:11So real quick, what is a continuous value? This is something with a decimal point and that could be housing prices temperature sales stock prices So our example is predicting house prices, but you could also use temperature or sales if you'd like So input features could be size Location or the age of the house So you would feed those input features to your model and then the model finds a relationship between the input and the output A common algorithm that we would use here is linear regression And that's why in this image you see a line going through those data points as we discussed before in In addition to linear regression, we can use decision trees and X cheap boost This is what we've been talking about when we're talking about machine learning Classification on the other hand predicts discrete labels or categories So the example here is it spam or not spam so the model learns from labeled examples and the outputs will be something like spam or not spam Hot dog or not hot dog and we explored this in a fun example with teachable machine So you should have a good idea of how this works Common algorithms include logistic regression support vector machines random forests and naive base
2:27Now I'm saying that regression and classification are machine learning But remember that machine learning is a form of AI in a subset of machine learning as deep learning So we were using deep learning for classification now that we have a really good idea of how machines learn from data Let's compare it to rule based systems. So what are rule based systems or what is rule based AI? We can say that it's classic AI and by that I mean no learning no data just rules So you manually program logic and that would be something like if X and Y then do Z and that is programming logic it follows flow charts or decision trees and Everything has to be coded up front. It doesn't improve with experience. It's just following rules So here the user inputs information and then the expert system does the rest Let's say that this non expert users Interacting with a UI or a user interface and then there's this rules engine in a knowledge base But all of that knowledge base was coming from an expert They literally had to add all of those rules and then once the rules engine
3:47Communicates to the knowledge base it flows back to the UI and back to the user and then provides of advice So let's take an example then draw is an expert system and it was designed in the 1960s for chemistry It analyzed mass spectrometry data to guess molecular structures and in this example It used over a thousand handcrafted rules and that means no learning just reasoning from fixed logic All right, so let's go through this dental expert system It engaged in scientific discovery by analyzing organic compounds and identifying their structure Which is pretty complex, but it did so using a collection of over a thousand rules and these rules apply to data using Logical reasoning and you can call that an inference engine in this case It was developed for mass spectrometry and it was used to generate the chemical structure Hypothesis from data and so the takeaway here is that dendral was rule based and used structured lab data Not machine learning to infer possible molecular structures So let's compare rule based AI with machine learning
5:02So we know that this one used rules and we can ask a question that it learned from data and the answer here is no And here we're learning patterns and did it learn from data? Yes, how about deep learning and prompted AI? So deep learning is using neural nets. I'll just use NN for that and Does it learn from data? Yes, even more so than machine learning. How about prompted AI? It uses large language models and does it learn from data? Yes Even more so than deep learning because there's no code. So this is software 1.
5:440 This is software 2.0 and this is 2.0 because it learns from data You're not explicitly programming it and this is 3.0 because you're using prompts to do the programming There's no explicit code So the takeaway is that rule based is logic written by humans Machine learning is logic learned from data Deep learning is logic that is learned end to end from data and prompted AI You just give it goals and plain English and it accomplishes them So I would say that rule based AI is fixed machine learning is flexible Deep learning is powerful and prompted AI is creative and language driven All right, so that's it for this video and I'll see you in the next video when we talk about deep learning
Deep Learning Explained Simply
0:00Welcome back. In this video, we're going to dive into deep learning. And we're going to start to think about human neurons or our biological neural network to help us understand artificial neurons. First of all, you might be asking, "What does a neuron even do?" So let's talk about that. So let's say that this is a neuron and it's taking in an input. And we're going to say that there's weight to this input. Meaning, how important is this piece of information, this input?
0:30And we'll give this a threshold of 0.5. So if this input is more important or has a higher value than 0.5, let's say that the weight is 0.6. That means that it's going to go into the neuron, and when it reaches this neuron, it's going to fire forward. But let's say that instead of 0.6, it's 0.2. Well, below the threshold. That means when it gets into the neuron, this input, since it's below the threshold, it just won't fire.
1:02And so what happens in a neural network is these weights get adjusted over time . And that's how it learns. Understanding the neuron is the first part. So deep learning uses artificial neurons which are computational units. And remember, all they do is decide whether or not something goes through or does not. That's it. And they're designed to simulate the way the human neurons process information. And that's how human neurons do it. They either pass it to the next neuron or they don't.
1:33So these artificial neurons are organized in layers to analyze and learn from data. So the deep part is that there's many, many layers of these neurons. You can think of this as a neural network. So you have the input going here into these layers. And it says, how important is this input? Let's say this is like horsepower miles per gallon and cylinders. And it's some sort of a neural network to understand if a car is fuel efficient or something like that.
2:05So this is not important. This is important. This is not important. And so there are going to be many hidden layers like many of these. That's why it's called deep. And it's going from the input and then eventually you'll get this output that will tell you something that you want to know about the input, so the relationship. And it does this through these neural networks. Now that's a very simplified version. But the reason I explain it like this is that we need to understand what the neurons are doing. And they're acting like a filter or a gate.
2:37You know, just think of, just think of Gandalf. Thou shall not pass. Or thou shall pass. Think of a neuron as Gandalf. All right. Deep learning finds complex patterns and data more than traditional machine learning methods. And you can really think of deep learning as the newer version of machine learning. So it's more powerful. It uses multiple layers to process information. And that's why it's called deep. And these layers, we're thinking about networks of these artificial neurons.
3:09It needs large amounts of data to work well. And it requires a GPU. This is a powerful processor to handle the calculations. And the good news is that we can use GPUs for free and co-lab. We're also going to use AWS, of course, but as I said, this is an industry standard in machine learning and deep learning. So some examples of deep learning include computer vision, which we've talked about. It identifies objects or dividing images into parts.
3:41And then this is like teaching the computer to see. And this is teaching the computer to read and write. And that's natural language processing. And these are tasks like translating languages or analyzing feelings and texts that's called sentiment analysis. What's important to take away from deep learning is that they require lots of data and powerful GPUs. I think that's the most important part and how these neurons are working.
4:11They're basically ganned off. They're allowing you to pass or not allowing you to pass depending on some threshold. Alright, so now here we have a neural network and we can examine how it works. So nodes, these are small units that are interconnected. These nodes are the neurons. So you have the input going into these hidden layers and you can have not just four, but you can have a bunch of these. The more you have, the deeper your neural network would be.
4:41And as you can see, they're interconnected. These nodes are organized in layers. And when the neural network sees a lot of data, what it's doing is that it identifies patterns and changes the connections between the nodes or these neurons. How does it change that? By changing the weight. And what is weight? How important is this connection to this one? So if the connection is not important, well, it's not going to pass to the next neuron. And so it'll change the weight of that feature and it'll give another feature, which is more important, more weight.
5:18So it can do that over and over and over in order to classify digits. And we're going to do that together using Google Colab. It can get to the point where it says this curvature is important, but this straight line is not important for this input. And that's how it makes this prediction. And so what's cool here is that these nodes are talking to each other. That's what happens in our brains as well. And they do so by passing or not passing data to the next layer.
5:50So that's that Gandalf action that we're talking about. And the math and the parameter tuning behind deep learning is beyond the level of this course. But the good news here is that we don't have to talk about this in this course because we're using AWS and it abstracts a lot of this. And that's what makes this such a good entry level course to get started with building and architecting AI applications on AWS. And finally, neural networks can have billions of nodes or neurons.
6:24So the takeaway here is that the data flows through these neurons and these connections between the neurons change as it learns. And that's about it for this video. And I'll see you in the next video where we explore a deep learning example, the MNIST data set. And that's going to be the handwritten digits. See you there.
Recognizing Handwritten Digits
0:00In this video, we're going to explore two examples. Here we have the MNIST dataset of hand-written numbers. This is a classic example. And we're also going to look at the fashion dataset, also an MNIST dataset. And this way, we can compare and contrast between the two. We're going to look at it from a high level and try to understand conceptually what's happening by looking at the neural network that we've been discussing, these artificial neurons. And then we'll go into Google Colab and look at different fashion items and try to understand how it's done programmatically.
0:35And I'll guide you through each part of the code. You don't have to write the code. It's just to get you to understand what it does at each stage in order to make these predictions. When we're looking at this example for the neural network, the first layer detects lines and edges. And what that means is that each layer is learning from the features or these inputs. We can call them input features. So the first layer detects lines and edges and the deeper layers recognize digit shapes. And then the final layer chooses the most likely digit. So when we're thinking about hand-written numbers, these are going to be the input data or the input features. And the process begins with an input layer consisting of pixel values. So each one of these images turns into a pixel. And then the data is analyzed through hidden layers that detects lines and curves. As you can see, zero has a lot of curves. And one is just pure lines. Finally, the output layer determines the most likely number . And that's this output here. Each layer recognizes a distinct pattern within the data. And pattern examples include vertical lines for the numbers one, four, seven, and a curved bottom
1:52for the numbers six, eight, and zero. Now this works is that the neural network learns to identify all of these patterns. Now let's take a look at the MNIST data set for fashion in Google Col ab. If you want to learn more about the MNIST database of the hand-written digits, here is the Wikipedia page. And I'll share this link below. And we're going to look at a similar MNIST data set but fashion. And here's a good view of all the items. You have shirts, pants, shoes. And this is a representation of the data set in a vector space. And we'll talk more about that as we progress through the course. But now let's take a look at the Google Colab here. So this first cell, we're going to shift enter, or you can hit the play button. What we're doing is importing TensorFlow. That 's the framework we're going to use for our model. And then matplotlib to visualize and NumPy. This is something that we often use in machine learning and deep learning. And here we're going to load the data from the fashion MNIST from TensorFlow. Let me run this. And there we have our data makes it really easy.
3:01And then we can look at the classes. So I know that it's T-shirt, tops, trouser , pullover, dress, coat, sandals, shirts, sneakers, bags, and ankle boot. So if we run this, now we can see that this is the classes that we're working with. One, two, three, four, five, six, seven , eight, nine, 10. So 10 classes. And now let's take a look at our images. And we can kind of search through eight images. And that's what we were doing here. Number of rows and columns just to look at the images and see what we have. And now we have our model. So here we're going to create a train test split, meaning we're going to have training data. This is where the model learns the patterns.
3:40We have the test data. And this is where the model is measured or tested to see how well it does. If it does really well on the test, then that means that it has a good chance of making predictions. Let's go through each one of these. So let me go ahead and run this. And now we 're going to convert the labels to one hot encoding. This is pre processing. We have to change the data. And that's what we did here. We did normalizing whenever you change the image to numbers, there's some pre processing that you have to do. And now here is the model. So what's really cool here is that we're using a sequential model, meaning we're doing one layer at a time. So here is the input layer. And 28 by 28 means each image for each garment is 28 by 28 pixels.
4:30Here we have our first layer in what this number is for neurons. So we have one layer for neurons, another layer of four neurons, right? So this is our neural network. It's pretty cool. So we have two layers of four neurons. So we have eight neurons in this neural network. But 10 is the number of classes that we had. So the output is going to be 10. Let's go ahead and run this. So all this does. Okay, so this is this code. I wrote it a while ago. We don't need this anymore, because it's changed. The code has changed. So they updated it. So you don't need the input shape anymore. But I'm glad I had that there because I was able to explain that there was 28 pixels by 28 pixels. Okay, so this has to do with optimization and the loss function. We're not going to talk about this right now. But what we're going to do here is train the model. So let me, okay, so right now I'm just going to take off callbacks. Well, actually , let me run this.
5:28And then I can run this again. That is not important for right now. But what is important, it's this part. This is the first epoch of 25. And this is where it's learning the patterns of all of the different classes that we looked at. This is the machine learning part in action. So what's happening is going through each one of these neural network layers, and it's adjusting those weights. And that's how the neurons are talking to each other. And then here you can see that we have a validation accuracy and in general accuracy. What this means is this is the performance of the model. So you can see that it's getting better and better and better. And here is being tested on unseen data. It's kind of like taking a test and memorizing the answers. You don't want to do that because then when you see new answers, you've never seen you'll do poorly. So that's why you want to compare the accuracy with the validation accuracy. The accuracy of this model is pretty good. It's already at 70%. And it's also the same for validation accuracy. So when we get to the 25th epoch, we should be at a pretty good percentage. And this model will make predictions. For example, we give it a picture of, let's say, sandals or a shirt, it should accurately predict that. All right, so it got to
6:44the very end and it got to almost 74% and 71% for validation accuracy. That's pretty good. And the takeaway here is that you don't have to learn what the code does exactly. And my other courses, like introduction to machine learning and introduction to deep learning, we really code all of this together . So you understand every line of code. If you want to do that, then I've listed those courses as a resource. The reason we're doing this is because in AWS, it abstracts a lot of this. That means that you can just give it images and you could tell it what you want it to do. And it'll do it.
7:23I'm going to give you all of the foundational concepts that you need to not only pass the AWS certified AI practitioner, but also to build awesome AI applications and tools using AWS services. So I'll leave this link below this video so that you can run this code if you like. And you can take this code and put it into a large language model. It'll explain what normalization is, what one hot encoding is, if you want to learn more, you can do that. Or you can just take one of my courses, I'll leave it up to you. All right, so that's it for this video. And I'll I'll see you in the next video on generative AI.
What is Generative AI?
0:00Welcome back. Generative AI is probably one of the most exciting parts of AI. So let's take a look at the different parts of the architecture and also some of the fun stuff like Dolly that creates images. When I think about generative AI, I think about it not analyzing but instead creating like creating text, images, sound, movies, and even code. We discussed earlier vibe coding and that's where people that don't have any programming background can talk to the different language models to generate new code. And I've seen complete entire worlds where people are collaborating in a game environment flying multiple different aircraft.
0:45And I'm talking like thousands of people and that was built with code but no coding experiences. So generative AI has a definite magical quality to it. And it's powered by deep learning architectures like the transformer. And in the challenge, we're going to use generative AI to learn about the transformer. But also I'm going to show you a couple of visualizations that really show how the transformer architecture works. It's super fascinating. Just like humans have attention, this transformer architecture uses attention to create weight for each word.
1:25And it completely understands a whole entire sentence at once, unlike other architectures which go token by token. And they can't remember the context for very long. And we know that foundation models are trained on large scaled or unlabeled or mixed data. And they can be adaptable to specific tasks via fine tuning or prompting. And so prompting is one example of creating vibe coding. So what's happening behind the scenes? So you have all of this data which can be unlabeled or mixed data types, videos, text, images, or structured or unstructured data. And here the pre- trained, this is where there's fine tuning that can go on in the foundational model. And then that means that you can adapt it to text generation summarizing image generation, which we're going to look at now and chat GPT and question and answering. So here's an example of generative AI that's pretty well known, which is Dolly. And as you can see, this is an amazing image. And we create these with these prompts. For example, here is one that we can grab and then go to chats GPT and
2:42then paste it in here. And that I kind of like a little bit better than this one, to be honest, wow, that's pretty cool. So now here I created another prompt. Let's go ahead and run this and see what happens. A hyper realistic, highly detailed photograph of a lifelike T-Rex, smoothly roller skating on a sunny day in Central Park, New York City. And I use this dictate. So we just performed a speech to text. And now we're going to get this image. So I like this line here, other dinosaurs in the background with people running and terra dactyls in the sky. This should be pretty interesting.
3:20And that's pretty cool. So I'm definitely going to download this and add it to the skill. Now let's talk about the transformer models. And this is the very architecture that started at all. When chat GPT took off, that T and GPT stands for the transformer. And the transformer architecture, when they created the white paper, people really didn't take it serious. They didn't know that it was going to take off. And that's what's so cool about the white paper. And we 'll talk about that white paper in the challenge so that you can create a podcast in that challenge so that you can learn more about the transformer architecture using generative AI. And what's cool about this transformer architecture is that it leverages hardware. And it wasn't until we had sufficient compute power that we saw the power of the transformer. So next time that you 're totally amazed by chat GPT, that's because of the attention mechanism in the transformer. Let's check it out. The reason that the transformer changed everything is because the model pays attention to every word in a sentence and not just one at a time. And this is how chat GPT writes such good text and
4:37can understand context. So it understands the entire sentence at once instead of step by step, which is what RNNs did. And these RNNs or recurrent neural networks are the older models that processed words one at a time and they forgot earlier information. Then comes the transformer. And they look at the whole sentence at once. And this is called self attention. And we have it right here. And another cool attribute of the self attention mechanism is that it enables faster, more efficient training and generation. And it uses that attention mechanism to weigh which words in a sentence matter most. So here we have an input and it goes into an embedding.
5:24And this is how we convert text into a format that we can feed into the model. And then we have self attention. And this self attention then encodes the information, which is basically numbers, and then passes it to the decoder. And then it has the self attention again, and decodes it and then produces an output. And softmax is going to give you a list of words. So what it is is a probability distribution that says which one is the most probable, right? So that self attention mechanism is what gives the weight to these different words. Let's take a look at a visualization so that we could try to understand this a little bit better. Okay, so here we have the transformer explainer from polar club, which this allows us to go into great detail. I was just talking about the soft max probability distribution. And that's right here. So what it does is that it gives each word a different percentage. So here's softmax. And you can see that each word has a different percentage. And so it picks visualize. So data visualization empowers users to visualize. That's what's happening behind the scenes. So if I click on generate, you can see what's happening with the
6:41attention mechanism. And then you can see that it shows a comma because data visualization empowers users to visualize, comma, organize, comma, and visualize. So you see, it's literally taking you through and adding these embeddings. If you want to learn more about embeddings, it creates tokens , which are these numbers, and then it has positional encoding. And then that's what goes into the multi head self attention mechanism. And we're not going to get too far into this, but you can see the intention mechanism, which then takes all of these words and puts them into this probability distribution. And then it tells you that the next most probable word is going to be visualize.
7:26I will definitely link this so that you can play with it below and check this out. You can, it'll explain what it is more about embeddings, transformer blocks, and the output probabilities, the softmax, more visualizations, and tokens and tokenization. We're going to get into all of this stuff in a later scale. But I did want to give you this resource for now. All right, now on to diffusion models, diffusion models, generate images by starting with pure noise and gradually turning that noise into meaningful images. So there's two key steps. So the training. And this is where we take a real image and then slowly add noise until we get a box that resembles something like this. And the reason they do this is that the model learns how the noise changed the image. And then it can do this amazing thing by flipping it in reverse. So then it starts with noise here. And then it ends up with this image here. So the model reverses the noise step by step. And then we get that bunny image that was generated from this prompt using a diffusion model.
8:39And I'm getting all of these amazing visualizations from the Polo Club of data science. And if you scroll down, you'll see that this is where I got the transformer explainer. I'll definitely share this with you as well, because we also have the diffusion explainer. And this is showing you step by step how it goes from noise to an image. And this is the part where it reverses. This is not the training part. If you want to learn more, this goes into great detail. And this is a wonderful resource. So what are multi model models? So good examples are cloth three from anthropic, grok from X AI, Gemini from Google DeepMind. And they can understand more than one kind of input. So we're talking about a prompt, maybe an image or audio. And then you have this prompt generate a video with the picture, make the bunny speak in the included audio file. And then this multi model model will generate a video, including all of the different types of data. And it can generate words, pictures, audio. And in this case, video. And what's really exciting is that you can speak to the model, show it a photo, ask it to respond. And it will respond with text, voice,
9:58drawings, or videos. And one good example of a multi model model is lava, which is a large language and vision assistant. And you can check that out from old llama. So how do human brains compare to AI? I find it really useful when learning about AI to think about my biological neural network, because that's a form of reverse engineering. All of the software was created from us. So we can use their software and their algorithms to try to understand it by thinking about our biological version. So we can say when we're thinking about classic AI, that would be clear rules. If this happens, do that. If you're driving a car, you're probably going to see a red light. And that means stop. But when you're thinking like machine learning, this would be like learning that touching a hot pan hurts. So probably don't touch it again. Now when you're thinking about deep learning, this might be more subtle, like recognizing a pet that's in a different lighting. So you're in a darker surrounding at a park, but you can still recognize that that is your pet. And then finally generative AI, we can use what we've learned, like writing a poem
11:14painting a picture or coding from scratch. This allows us to create new things. So all of this is really not as foreign as it might seem. It really is a very intimate connection with biological neural networks and software modeled after the brain. Finally, we have some key machine learning terms to remember. So again, is a generative adversarial network. And it creates new synthetic data by learning to mimic the training data. You can think of it as a forger or a twin maker. And this is good for creating fake faces or synthetic art. And this is an example of that. If you look down here, it's a style again. This is definitely a fake face, because the website is called this person does not exist. So every time I reload this, you're going to get a different person. This is interesting, because this is a very young person, but they seem to have facial hair here. So you can kind of tell that's you don't usually see those giveaways. And these are great examples of a generative adversarial network. Next, we have GPT. And we talked about that because we looked at the transformer architecture, and we can think about chat GPT. Next, we have BERT.
12:31This is bi-directional encoder representation from Transformers. And this is very similar to chat GPT. But I would think of it more of a reading comprehension expert. It's really good for search classification and summaries. And then we have WaveNet. I like to think of WaveNet as a sound designer, because it's good for voice synthesis and music. And here we have ResNet, which I like to think of as a vision specialist. And it's a deep neural network built for recognizing images, detecting objects, and facial recognition. Next, we have XG Boost. And I like to think of this for tabular data prediction, because it's a fast and efficient version of gradient boosting, which is used for structured data. So data inside of tables. And then RNN, we talked about this briefly, which is a recurrent neural network. We were talking about the transformer model, and how good it is at understanding the context of sentences. We said that the older model, the RNN, wasn't as good, because it processes sequences like text or time-sene arest data, but it did so one at a time. And it's also useful in speech and forecasting,
13:49but it's not as good as the GPT because of the transformer architecture. And last but not least, we have the support vector machine, which is a classical algorithm. And you can think of this as a decision maker. It's good for binary classification. And it's mostly associated with early machine learning, used to classify data or make predictions. All right, so that's it for this video. And I will see you in the next video, which is the challenge.
Challenge 🎉
0:00Congrats on making it to the end of the skill and the challenge. This has been a fun skill for me. I hope you enjoyed it as well. There's so many mind-blowing concepts and AI tools and versions of artificial intelligence in this skill one after the other. So let's go ahead and switch gears. Right now we're gonna check out Google LM and we're going to check out the transformer architecture the white paper and try to create a podcast and it's something that's very useful for learning. Let me go ahead and break it down now. Alright so here we are notebook.google.com and all you need to do is search for attention is all you need and download this PDF and try to figure out how to make a podcast using notebook LM. It should be pretty straightforward and then after you do this I'll see you in the solution video in case you get stuck and there'll be some quiz questions to answer in the rest of the challenge. See you in the solution
Solution
0:00Alright, congrats on completing the challenge. And now let's go ahead and create a new notebook. I'm going to upload that attention is all you need PDF, white paper. And there it is. And you can do a bunch of stuff. You can actually type here and give it some more instructions or ask it questions. Or you can customize this audio overview. So you want to shorter. Let's do a shorter one. So you can add things here like you can say focus on a specific source or maybe target audience like explain it to me like I'm five years old.
0:37You can do all kinds of stuff. So let's just leave it like that. I'm just going to say shorter and then generate. And it'll take a few minutes and then you'll have a podcast and you can download it and you can share it with people. And this can be a useful educational assistant as well. Okay, until next time, I hope this has been informative and I'd like to thank you for viewing.
Frequently asked questions
What is the difference between AI and machine learning in the AWS Certified AI Practitioner course?
This lesson frames machine learning as a form of AI, with deep learning as a subset of machine learning. Rule-based AI is logic written by humans, machine learning is logic learned from data, deep learning learns logic end to end from data, and prompted AI accomplishes goals given in plain English.
What topics does the Compare AI Vs. Machine Learning lesson cover?
The 52-minute lesson covers AI versus machine learning, what machine learning is, deep learning explained simply, recognizing handwritten digits with the MNIST dataset, and what generative AI is. It closes with a challenge and a solution video so the learner can check for knowledge gaps before the course gets more granular.
Does a team member need math or coding experience to follow the deep learning portion of this lesson?
No. The trainer notes that the math and parameter tuning behind deep learning are beyond the level of this course because AWS abstracts much of that work. The Google Colab walkthrough shows the concepts in action, and the code link is optional for learners who want to run it.
How does this lesson explain regression versus classification in machine learning?
Regression predicts continuous values such as house prices, using algorithms like linear regression, decision trees, and XGBoost. Classification predicts discrete labels such as spam or not spam, using algorithms like logistic regression, support vector machines, random forests, and naive Bayes.
How does this lesson fit into preparation for the AWS Certified AI Practitioner (AIF-C01) exam?
It is one lesson in the roughly 16-hour AWS Certified AI Practitioner (AIF-C01) course, building on earlier coverage of cloud versus local and core AI concepts. For an IT Director or Training Manager, it establishes the shared AI, ML, deep learning, and generative AI vocabulary that later lessons on AWS services, responsible AI, and security build on.
What will a team member be able to do after completing this lesson?
The learner will be able to explain how AI, machine learning, deep learning, and generative AI differ, including why deep learning requires lots of data and powerful GPUs. They will also recognize examples such as computer vision, natural language processing, sentiment analysis, and multimodal models that accept text, image, or audio input.
Team training path
Turn this skill into assignable team training
This free skill is a preview of the courses your team can assign, track, and report on with CBT Nuggets.
Free training library
More free lessons in AWS
AWS
Understand and Deploy S3
Free lesson from AWS Certified Solutions Architect – Associate (SAA-C03) · 1h 16m
AWS
Getting Started with Amazon Web Services
Free lesson from AWS Certified Cloud Practitioner (CLF-C02) · 1h 2m
AWS
Create and Deploy Code in the Cloud9 IDE
Free lesson from AWS Certified Developer – Associate (DVA-C02) · 1h 1m
AWS
Create Site-to-Site VPNs
Free lesson from AWS Certified Advanced Networking – Specialty (ANS-C01) · 57m
AWS
Building Networks on AWS
Free lesson from AWS Certified CloudOps Engineer - Associate (SOA-C03) · 1h 22m
AWS
Course Introduction and Getting Started
Free lesson from AWS Certified Security – Specialty (SCS-C03) · 44m
$59
seat / mo, billed annually
