Skip to content
CBT Nuggets
DemoBook a Demo

Explore Deep Learning Foundational Concepts

This skill provides an in-depth exploration of foundational deep learning concepts, building on prior knowledge of machine learning, Python, and TensorFlow. Key topics include artificial neurons, neural networks, convolutional neural networks (CNNs), and natural language processing (NLP). The course also touches on generative AI and large language models (LLMs), offering practical examples and TensorFlow code implementations to solidify understanding.

Full skill from Deep Learning. Preview the training IT teams trust.

Updated

44m

Skill 1 of 38 in Deep Learning

What you'll learn

  • Compare traditional programming with machine learning and deep learning using the input X to output Y model structure
  • Describe how deep learning, generative AI, and LLMs fit within the broader field of AI and machine learning
  • Build a basic neural network in TensorFlow with the tf.keras Sequential API in a Colab notebook
  • Explain forward propagation, loss functions, backpropagation, and gradient descent when compiling and fitting a model with Adam and binary cross entropy
  • Explain how a convolutional neural network processes an image, including pooling with MaxPooling2D
  • Describe the NLP model workflow from preprocessing through training with an optimizer and loss function to evaluation and inference

Free 44-minute video lesson with a full transcript and knowledge checks. No account needed to watch.

Welcome to the Introduction to Deep Learning course, where you'll Explore Deep Learning Foundational Concepts! This course follows the Introduction to Machine Learning course so you should have completed that course or have some basic Python and TensorFlow machine learning skills under your belt to get the most out of this course. In this first video, we'll review everything you're going to learn in this skill:

  • What is an Artificial Neuron?
  • What is Deep Learning?
  • Neural Network Basics
  • Convolutional Neural Networks (CNNs)
  • Natural Language Processing (NLP)

What is An Artificial Neuron?

From Wikipedia, "Artificial neurons are designed to mimic aspects of their biological counterparts. However a significant performance gap exists between biological and artificial neural networks." In short, it's code we write to mimic weighted synapses to make predictions.

Knowledge Check

Which of the following have inputs and outputs?

What is Deep Learning?

In this video, we'll explore machine learning and its very popular subset, deep learning. We'll also take a sneak peak at Generative AI and Large Language Models(LLMs). See you there?

Knowledge Check

What is deep learning?

Neural Network Basics

In this video, we'll explore neural networks with TensorFlow code. If you feel that you already know this, skip ahead, otherwise this will serve as a review as we compare machine learning to deep learning models. See you there!

Knowledge Check

In TensorFlow, how would you start to build a basic neural network?

Convolutional Neural Networks (CNNs)

In this video, we'll explore how convolutional neural networks work by looking at an image and comparing how our eyes work and how TensorFlow accomplishes these tasks. In the context of image classification, we'll explore Feature Extraction, Feature Enhancement, Complexity Reduction, and Classification.

Knowledge Check

Which of the following analyzes features in an image?

Natural Language Processing (NLP)

In this video, we'll check out Andrej Karpathy's miniGPT and how we can implement it in TensorFlow. Let's do this!

Knowledge Check

What does Andrej Karpathy like to do?

Code examples

# NNs

model = tf.keras.Sequential([
    tf.keras.Dense(64, activation='relu'),
    tf.keras.Dense(10, activation='softmax')
])


# Activation Function

tf.keras.Dense(64, activation='relu'),

# Forward Propagation

model = tf.keras.Sequential([
    tf.keras.Flatten(input_shape=(28, 28)),
    tf.keras.Dense(64, activation='relu'),
    tf.keras.Dense(10, activation='softmax')
])


# Loss Function

model.compile(optimizers='adam',
              loss='binary_crossentropy',
              metrics['accuracy'])


# Backpropagation and Gradient Descent

 model.fit(train_images, train_labels, epochs=5)


# Eval Model on Test Data

model.evaluate(train_images, train_labels)


# Convolutional Neural Netowrks (CNNs)

# Feat Extraction
tf.keras.layers.Conv2d(filters, kernel_size, activation)


# Enhancing
tf.keras.layers.Conv2d()


# Reduce Complexity
tf.keras.layers.MaxPooling2d(pool_size)


# Classification
tf.keras.layers.Dense(units, activation)

Challenge

It's time to check your knowledge of everything you have learned so far by completing the challenge questions below. Take a look at the image below and match each step to the appropriate plain language description.

Bridge over partially frozenriver in Winter
Bridge over partially frozenriver in Winter

Knowledge Check

Match the following terms to their respective descriptions outlining convolutional neural network (CNN) steps:

This interactive assessment is available in the full learning experience.

Want to answer questions like this yourself?
with no purchase required. Already have an account?

Knowledge Check

How would you rate the difficulty of this skill for you on a scale from 1 to 5, with 1 being very easy and 5 being very challenging?

This interactive assessment is available in the full learning experience.

Want to answer questions like this yourself?
with no purchase required. Already have an account?

View Transcript

Explore Deep Learning Foundational Concepts

0:00Hello and welcome to this skill on how to explore deep learning foundational concepts. This skill actually follows the introduction to machine learning course, so you do need to have some skills under your belt to get the most out of this. So let's go ahead and do that first and talk about the differences and make sure that we have those prerequisites covered. And then we'll talk about everything that we're going to learn in this skill. All right, so this is coming from the ML course.

0:31So that means that you should have some idea of Python and a feel comfortable programming Python and the different libraries like pandas, scikit and TensorFlow. And we will also cover PyTorch in another course. So here we're really just focusing on TensorFlow and all the related libraries. And we're going to be using Colab, but in a subsequent course, we're going to be using PyCharm.

1:06So if you're interested in the TensorFlow developer certificate, then definitely keep an eye out for that course coming up next. But for now we're going to be using this Colab environment, Google Colab, and this is what you would need to know before starting this course. But first, what is AI and how does deep learning fit into that? So let me just ask this question. What is AI? So we have data science.

1:38Then we talked about machine learning. So that's what you need to have some sort of foundation there. And what's interesting here is if you have a little bit of experience with machine learning, that means that you also have some experience with data science or data analysis. Because machine learning really takes a lot of the skills that you find in data science. So there's a lot of overlap here. Same thing with data analysis. So now we can talk about deep learning, which is a subset of machine learning.

2:13And that's what we're going to talk about in this skill. So before I do that, I want to point out that it's a subset of deep learning is gen AI. And which is super popular because another subset is LLMs. And you probably have heard of chat GPT. And while we're going to be focusing on deep learning, I did want to clarify that gen AI is a subset of deep learning and so are LLMs. So we're not really focusing on LLMs or gen AI at this time.

2:46We're focusing on deep learning and just making sure that you have machine learning skills under your belt, just to make sure that you get the most out of this course. Let's also compare traditional programming and compare that to AI. So let's just say AI here, just talking about machine learning and deep learning and things like that. But here you have a program where you write a bunch of scripts or lines of code and then you execute that.

3:21And then this program usually just needs to be executed. Whereas here we're actually passing in an input and we get an output. So this input is usually something like X and then we get an output Y. And in this case, it's a different structure. So it's a different process. So here we just have this input and then here we have our model. And this model does the magic and then passes out this output.

3:52We don't have to say anything about how to do that. That's why we build a model to do that for us. Whereas here we're explicitly programming. We're saying here do this. If this is happening, then do this and so on and so forth. So that's the main distinction here. And another important distinction here, I'm going to write ML and here is DL. So now that we know that in traditional programming, we have all these scripts or these lines of code that explicitly tell the program what to do.

4:22But with machine learning, we are basically making a prediction. You have this input X and then you get an output Y, which is that prediction. So what's the difference between machine learning and deep learning? Well, here we're doing the same thing except that we have many hidden layers. And we'll talk more about these hidden layers. This should be familiar if you're coming from the machine learning course. So we're going to the difference is that we're going to have many hidden layers .

4:56So machine learning and then deep learning really is just about deep neural networks. So we're going to use many neural networks. So that's where the main distinction is here. And as I said, this is the first skill. We're going to explore deep learning foundational concepts. And now that we have this out of the way, what we can do is really continue with what we're going to learn. And I just wanted to just say really quickly here that we will be creating another course for the TensorFlow developer certificate.

5:29So keep an eye out for that course coming up soon. So until then, we're going to talk about this skill and what are we going to learn in this skill? The first thing that we're going to learn is what is an artificial neuron because we're going to compare that to the human brain basically. Let me see if I can draw a brain here. And we're going to talk about neurons in the brain and then talk about it in the context of TensorFlow, really illuminating. And here we're going to talk about deep learning.

6:01So what is deep learning? And really dive deeper into those neural networks. And since we've brought up neural networks, we're going to dive into what are neural networks because we have many neural networks, but what really are they? And then we're going to talk about the different kinds such as deep neural networks, convolutional neural networks. And then we're going to talk about NLP, which is sort of a subset of a lot of these things. So a lot of really exciting stuff to talk about. And I will see you in the very first video where we talk about what is an artificial neuron.

What is An Artificial Neuron?

0:00Welcome back. In this video, what we're going to do is compare artificial neurons with biological neurons because, well, first of all, that's where we get the concept of an artificial neuron. And more importantly, we want to compare them because we're very far away from AGI, meaning that there's a lot more complexity to how a neuron works and we're using a very simple form of a neuron. So without further ado, let's dive into this. So what is an artificial neuron? And here, I 'm going to say artificial neuron. And these are basically trying to mimic their biological counterparts, right? However, there's a huge gap. So we mentioned that.

0:49So this is nowhere near where the artificial neuron is nowhere near the biological sort of counterpart. So what we want to do here is kind of draw this out. So I'm going to try to draw this sort of neuron body here. And then here is this sheath and we'll talk about that. And then we have these sort of like terminals, right? I'm going to define these in just a second. And then here, this can go out like this. I've gotten a lot of experience doing this because this is what we've been talking about. So here is the body. So here, you can call this soma, which is the cell body. That's the technical term. And then these are called dentrites. And these are the axon terminals. And why am I going through all of this stuff with you? And so here, I'll explain that in one second. So here's the myelin sheaths. Let me just put these like this and they get stronger as more current goes back and forth. So the inputs, since this is why we're doing this, so we would take x whatever x is. And you would have x one, x two, so x n

2:07. So however many number of inputs that you have go into this neuron. And then they go through this direction, right up through the sheath into these outputs. And they get the output is here. And what happens is that it goes through these acts on terminals out. So this would be y one, y two, and basically y of n. Let me put these dots here. All right, so it's your as this becomes more and more used , these sheaths get stronger, and then this becomes more and more prevalent. Now, this is where we end the comparison because now we're going to take a look at the the counterpart, which is the artificial neuron. And one thing I noticed here, this is the I should define this, this is the biological neuron. All right, and what we're doing here is just talking about the comparison. Okay, so this is a biological neuron. And now let's take a look at the artificial neuron. To compare the artificial neuron, I'm going to create these little circles, which will help us to understand this. I'm going to say this is a B C and D. Okay, that

3:26looks like a B. And again, these are inputs, right? And when we're talking about the artificial neuron, we have to create these lines, right? And this goes into the , I would say this is the body, but really what this is, let me try it like this, and then, and label this, this is basically the sum of weighted inputs. And I'm going to put plus minus on each one of these. Okay, so this might be a review for you , and you might understand this. And so that's great, because every sort of, it's like a layers of paint. So the more layers of paint that you have, the thinner and the more layers, the better. All right, so now that we have these inputs that are coming in going into this, the cell body, you could say. And here, I'm going to add something that we're going to talk about in a second, which is bias. And then these are the weights. Okay, super important stuff. So now that we have these inputs,

4:42and it goes through the net input function, right? So the, the neuron basically adds up the weighted inputs, and it receives a, let's just say that it's done in a task appropriate way, right? Based on whatever output that we're looking for. And then it goes into, and this is another review, activation function. And what happens here is like, let's say that there's some sort of a threshold, right? Like right about here. So if it, if it's above that threshold, right, if it's here, then it's going to fire that that activation fire is going to fire. And that's what the biological neuron would do. And here, the artificial neuron when it fires, what it does, is that it produces a output, right? And so we can say here, output. That 's the final step. So what is the weight in the bias? So here, when we're talking about the weights, the input values are modified, because we want them to reflect how important they are to the output, right? So these weights are going to take these inputs and give them different weights. Oh, this one's much more important than this one, right? And we'll get into this as we dive into the

5:59course. But once you have these weights, then we know how important each one of these inputs are. And then this bias over here is how the neuron learns through feedback. And what it does is that it makes adjustments to the weights, right? And the function values. So the, the activation function, or the, so I would say the bias is back propagation. Remember, we talked about this, how we take the output, and then we modify them, because this is a loop. And when we do that, we adjust the weights and the function values. And what this does is gives us a better and better output. For instance, let's say we're trying to bake a cake, somebody's birthday cake. And we need some ingredients. So if you think about it as an ingredients, we want to come up with a final flavor. So what we're doing is we're determining how much influence each ingredient will have on the cake, right? So you want three cups of flour, and maybe one teaspoon of salt, and so on.

7:08So you can see that these inputs that were going into the cake are going to have different weights, right? So this is a lot more important than this one. And conversely, if you're trying to figure out, in here, we're talking about bias, and if you're trying to figure out like how much a box weighs, right, and you have an average understanding that these boxes usually weighs around 50 pounds. So you can just start with that average number, and then adjust your guesses as you get more information, right? Like maybe, you know, what's in the box and things like that. And if the input is strong enough, then what happens is that it fires, and then it creates an output. Otherwise, it doesn't. And to review the weights are really the importance of the input inputs, like what are the values are important for each input? And then the bias is just how we use a starting point , basically, and start to make adjustments as we get in for more information. And then we create that cycle, right? That iterative cycle where we get better and better predictions. All right, so that's about in this video, and I will see you in the next video where we answer the question, what is deep learning? See you

What is Deep Learning?

0:00Welcome back. In this video, we're going to check out deep learning. I answer the question, "What is deep learning?" Because while we've covered it before in the intro really quickly, and we've talked about this before and it's a review, it's really important to get the nuances together before we move forward. So let's check that out. All right, so we're saying what is deep learning, but we're also thinking about this in the context of AI. So what is deep learning? And I'm just going to add AI here. Let me add this a little bit lower. So AI is the largest domain. So this is the-- oh, didn't get that circle in there. How about that? There we go. So here is AI, and this is like the largest sort of domain that I guess this term is a very general term, right? So it can mean a lot of things. So the first thing that means is machine learning. I guess we'll make that pretty big.

1:05So this would be ML. Let me write this over here. I think this will make more sense. And machine learning is, again, a broad field of AI focused on building systems. And what it does is make decisions based on data, right? So that can include supervised learning and unsupervised learning. And we'll talk about those real quick. And you may already know what these differences are.

1:38Again, this is a review. So here we're talking about data that has labels. So labeled data, and we're trying to make predictions after we train that data to un-seeing data. So it's going to train on labeled data and then make a prediction. Whereas unsupervised has no labels. And really what we 're looking for is trying to discover patterns, right? Things that we don't know about the data. So it can do this for its on its on its own more or less. So these are the two main subcategories of ML. And we've already covered things like, and we're talking about supervised learning here.

2:18So we've talked about classification and regression, and in unsupervised learning, we haven't really gotten too far into that. So we can do things like clustering, which is basically taking a group of similar data points and clustering them together, and dimensionality reduction, which is basically simplifying data by reducing its features. And but the takeaway is that we're going to keep the most important information. So you're not taking away the important information, you're just simplifying data by reducing the features. All right, so that's ML in this really, in an overview, right? So then what is deep learning? So this circle here, we can say this would be deep learning.

3:00And inside of deep learning, we're focused on artificial neural networks with more multiple layers . So that's the difference between machine learning and deep learning. The deep part comes or is used because we're working with multiple layers. So deep learning can be applied to both supervised and unsupervised. So it's good to know. And it's awesome for complex tasks, and things like we'll cover, like image and speech recognition, NLP, which stands for natural language processing and others.

3:33And because of the popularity of LLMs, we're going to talk a little bit about Gen AI and LLMs, not because we wouldn't go into that too much in this course, but just to give you that context, because maybe you're interested in learning those, and we're not going to go into those too deeply in this course. But at least we can check out the high level overview of how they fit into all of this. And here, we can say, Gen AI, and then a smaller circle here for LLMs, right? And this LLM's we're referring to is things like chat GPT, they generatively create the completion and things like that. And again, this is simply a review to make sure that you have all of these concepts, because the learner, you are coming from different places. So I want to make sure that it cover all of these steps. So if this is familiar, you can skip through the video or skip the sections that you're familiar, but I would also recommend to just review them anyway. All right, I will see you in the next video. And on neural network basics, see you there.

Neural Network Basics

0:00Welcome back. In this video and in the next video, we're going to talk about neural networks and then deep neural networks. So I felt that the best way to handle that is to prepare for the next video by talking about neural network basics in this video. And we 're going to do that by writing some tensor flow code, which again should be familiar. And that's going to allow us to kind of fly through this and really get a good understanding of neural network basics so we can dive into deep neural networks. Okay, so here is our collab notebook.

0:39And you should already have a collab notebook. And if you don't, just make sure that you're logged into your Gmail account and then navigate to Google, excuse me, collab. google.com. And in that way, you can get started. And then you want to just either you can copy this notebook or just create a new blank notebook. And again, this is not super important that you actually even open up a collab and start to write code because you're just going to follow along and you can actually get through this without using collab. But if you wanted to, then, and you don't have it set up, then that's how you can do it. I just want to make sure that I'm not like, you know, removing or like blocking opportunities for learning, right? So the direct opposite. All right, so what we're going to do is just write out a neural network. So a basic neural network and tensor flow. And we can just define this like we did in the previous or the introduction to machine learning course. So here we're just going to say TF dot Keras. And we're going to use that sequential API.

1:43Because it we're going to run this in a sequence. And then inside of this, what we're going to do is just pass in this object. And then we can say TF dot Keras dot dense. And I'm going to just create two of these real quick at a comma there. And this first one, what we're going to do is create, let's say 64 neurons in this first one. And then an activation function is going to be Ray loop. That's what we're using before. And that's our first layer. And what we're going to do here is the second layer, we're just going to add 10 neurons. And just real quick, this is a part of the MNIST model. So it has 10 outputs.

2:28So this is our output layer. So I just wanted to give you a heads up that that 's why it's 10. In case you were wondering. So the activation function here. It's going to be softmax. And if you recall from the earlier video, when we're drawing out the biological neuron and then the artificial neuron, we talked about the activation function and back propagation, forward propagation, and then adjusting the bias, right, or the bias adjusting the weights. And so we're going to go through as many of these as we can to try to tie those concepts up to some code. So here, it's this first layer, let me just grab this right here.

3:19This is the layer that is controlling the neurons output. So the activation function, if it gets to a point where it has an, it reaches a threshold, then it's going to activate. And what that means is going to pass through to the output. And in a sense, what we're doing is basically the neurons output. And that's what's going to make a better output. So let's continue down this and we're the activation that we're using here is Ray-Lue. And to define forward propagation, what we're going to do is just take that model and then add a little bit more to it. So what we're going to do first is add this, a first layer here that we didn't add before. And this is a layer that where we're flattening our input.

4:05And I'm going to say the input shape so that we can see what we're doing here is 28 by 28. And this is going to make more sense because we're going to be working with images. And this is the pixels, 28 by 28 pixels. And I do need to add a comma here. And let's see. Yeah, so this is good enough. And so what's happening here is that we're defining a sequential model. So it's going to go through these in sequence. And before we can get into back propagation, and that's the part where we send the data back to sort of update the weights, right, to so that we have a better sum of weighted inputs. We need to look at the loss function, then back propagation and gradient descent. So this is the four propagation where we take everything and pass it through in a sequence. And now we're going to add in the other steps. So let 's go ahead and add a loss function, in this case, binary cross entropy. So model dot compile.

5:13Optimizers. And here, we're going to use Adam for the optimizer. comma. And then the loss. Here's where we define the binary cross entropy. function, And comma as well. And then here, finally, we're going to define the metrics. And what we've been using is accuracy. So let's use that. And now that we've set up our loss what we need to do is optimize, optimize model by minimizing the loss. So what we can do, with TensorFlow, is by using the internal models process, basically training.

6:05So we would say model dot fit train images. So this is the name. We haven't gone through this. So just understand that this is the input. The images and then train labels. So x, y. And then epochs is how many times that we're going to do this. So we're going to go through the data set five times. And when we do this, TensorFlow performs back propagation and gradient descent to optimize model. So that's what we're talking about. So then it goes through that iterative cycle, right? It updates the weights in the bias. And this cycle gives us better and better outputs. But you're probably asking yourself, what about deep neural networks?

6:58And that's exactly what we're going to talk about in the next video. See you there.

Convolutional Neural Networks (CNNs)

0:00Welcome back. This is probably the takeaway of this skill. However, the last video, the next one, is going to be a lot of fun. And we're going to talk about NLP. Here in this video, we're going to talk about convolutional neural networks. And we're going to talk about it conceptually. And then also side by side use a practical application. So we're going to look at a photo and try to do the same thing that a convolutional neural network is doing. And we're going to compare that with tensorflow code. Alright, so let's take a look at that and do this together. So first, I wanted to mention that we didn't do this. Let me comment this out. So we need to complete the code, which is basically the evaluation on the training and labeled data. But here is convolutional neural networks. And what we're going to do is write a little piece of code and then really talk about what our eyes are doing. Like, you know, when we look at this and also like what the steps are for a convolutional neural network to process and observe the scene.

1:04Alright, so to do that, we're going to start with, I guess, this would be feature extraction. And the way that we would do this is TF dot Keras, like we've done, and then layers. And here's where it 's different, com 2d. And this is basically, it's the CNN layers that we're going to use here . And then it takes in filter or filters and kernel size. And then the activation. Okay, so let's talk about this step by step. So here's the idea. So we're going to look at this photo and try to scan different parts of this photo, like maybe the trees or the road or the color of the bushes, right? These are where this kind of stand out. This is obviously very colorful and stands out. This green does too, a little bit of red. So and then also this this shape, you know, the bushes going around the road. And just like our eyes are focusing on these different features, we're extracting those features, this piece of code up here is actually the com 2d is actually doing

2:24the same thing, right? And the filters and the kernel size is what determine the exact features , right? Like if we're looking at these bushes here or the road or something to that effect. So it's kind of like putting on, let's talk about the next step actually. So the next step would be enhancing the feature. And again, we're going to just be talking about this here, this object. And I guess we could do it like this if you want to be proper. And so what's happening here is that it 's kind of like when we're using filters, it's like putting on some sunglasses, right, or like putting a visual filter in front of a camera, right? And what this does is it'll, if for example , with photography, it might accentuate the colors more, right? So we're basically enhancing certain features and specific features in that in that image. And that's all again happening with this com 2d, the convolutional neural networks. And then you might want to actually do the opposite, which is reduce complexity, which might be okay. So I've noticed all these individual

3:46features. And now I'm going to step back and try to see the big picture. Like what am I looking at here, right? It's okay. So this is some sort of a park and it's the betrayal. But you're not really looking at all the details, you're kind of ignoring those details. And this is called pooling, which we're going to talk about later, complexity. There we go. And here we're going to talk about, let me just grab this. And this is max pooling 2d. And maybe it might take in pool size, to that effect.

4:24So what's happening here? Well, what we're doing is reducing the size of the data by focusing on the most important features, right? Much like you would distill the scene, right? Like, okay, this is a park, but you're not like, Oh, I'm looking at this red, yellow. That 's not going to tell you what the big picture is. But we haven't classified that. So we're not calling this a park, we're kind of stepping back and putting all of these objects together or these features together so that we can finally make a classification or classify this because we can, we've say that we've gathered the information, right, to make a decision or about the scene, such as the, you know, every individual feature that we've talked about, which is similar, like the decision making part of the brain. So we're going to now we're going to classify the image based on the features that we've actually extracted. Let's go through the list that we've extracted enhance and then we reduce their complexity. Now we can get into classification. And then we can say, Oh, this is a picture of a park with a trail. That code might look something like this, which again, this

5:42is whatever units and the activation function. So this should be familiar. And basically, we're classifying this image based on the features that we've analyzed, that we've extracted and enhanced and so on and so forth. All right, so that's about it for this video. And that's a conceptual and practical application of how this works. And I'll see you in the next video on NLP, which stands for natural language processing.

Natural Language Processing (NLP)

0:00Welcome back and congratulations on making it to the final video and the challenge, which is a little bit different than most challenges because this skill is mostly conceptual. So the challenge is going to be a conceptual challenge in the sense that you're going to answer questions or answer questions about conceptual, about concepts. There we go. Normally that these challenges are like code base, you do something, right? They're like steps and you get to do something and then you execute that code and you see if you did it or not, you know? And then I show you that solution. But in this case, it's just going to be quiz questions testing you on the concept or giving you a challenge, I should say, on that concept. But before we do that , we're going to dive into NLP, which stands for natural language processing. And we're going to talk about mini GPT, which is going to be awesome. It's a lot of fun. So let's do this.

0:57All right, so this is mini GPT down here. And we're going to talk about this. But here is saying that it's a pie torch reimplementation of GPT from scratch, basically, both training and inference. And it tries to be small, clean, interpretable, and educational, which is pretty awesome. So if you want to read more about this, definitely check it out. You can go to github.com /carpathie/mini GPT. GPT is all caps. And this link will also be below the video. But let me show you this github first that you should definitely follow. This is Andre Carpathie. So here it says, "I like to train deep neural nets on large data sets, and this is true. And I would definitely follow him on Twitter as well. He's also the lead at the..." I guess I'm not sure what the title is, but he's the head of AI at Tesla and working on this full self-driving and FSD and all that good stuff. So this is something somebody should definitely follow if you want to learn more about deep neural nets. Because if you follow him on Twitter, you're going to get updates about new things happening almost every week, sometimes every day. Not necessarily from

2:14Andre personally, but there's a lot going on in this space. All right, so now back to mini GPT. So mini GPT, let me go all the way back up here. You can see here that there's a lot of code . And what this is trying to do is showing you how to do this from scratch. So it says here that trains a GPT from scratch to add a number inspired by the addition of section in the GPT three paper. So this is really cool. There's a lot of information. I'm not going to really get into all of this here. What we're going to do is a little bit different. I'm going to take you through a tensor flow sort of tutorial on how to do this, but in tensor flow. And this is something that is going to be conceptual. And I'm just going to write it out and the dried out in the blackboard.

2:59But this is something that you could actually do. So after you take this course , you could actually go back to this and try to recreate this using tensor flow. You'll see what I mean when we outline this together. All right, so let's draw this out. So number one , step one would be data pre-processing. And so we would take that text data and start pre- processing it. And what does that mean? Tokenization or tokenizing. And this is basically creating and basically word chunks that we can connect them together, like words and characters. And you convert these into numbers. Right? So we're very familiar with that. Oops, let me write this correctly numbers.

3:54In step two, we're going to build a model. And we've done this a bunch with tensor flow. And what's cool here is that we can build a simplified transformer model. Right? And this is really important for handling sequential data. So here we're going to say transformer. Which is the attention mechanism. And we've already talked about that. But definitely, if you want to refresh her , check it out transformer attention mechanism or the paper attention is all you need.

4:32And this is basically showing you how deep learning models can learn from basically language text, language data, right? And this is basically learning from language patterns. And that's an NLP task. So we can see that. All right, then number three, we train the model. And then number four, this is the evaluation and inference. Okay, so here, when we're training the model on the pre-process data, we configure an optimizer, loss function. And then we run the training loop. Okay, so I'm just going to make a loop like this.

5:22And then finally, we measure the performance, right? Because we want to improve it to get it to the point where we can actually release this. And that allows us to have a model that can perform NLP tasks like generating coherent tasks without any problems, right? And this is just a quick example of how you can use Carpathi's tutorial and TensorFlow to build and to better understand neural networks, right, in the context of NLP tasks. So I just kind of wanted to lay that out and to show you how they're related NLP and deep learning how you can, their subsets, we've talked about that. And we're not going to get too deep into that in this course. We will get into NLP, but not so much generative AI and GPT sort of models. We did cover that a little bit in the introduction to machine learning course because it just came out. And I felt like, well, better cover this a little bit because otherwise you're going to want to do that. So we covered it a little bit, but we're going to dive deeper into NLP because that's a better path to fully understand deep learning and then get into NLP and then you can get into LLMs.

6:34All right, Until next time, I hope this has been informative and I'd like to thank you for viewing.

Challenge

0:00Congratulations on making it to the end of this skill and the challenge. And before we start the challenge, I just want to sort of front load that this is a different challenge. Most of the challenges are going to be code-based or task-based where you have a challenge and you do something and then you execute the code and then you'll see whether or not you did something or with the performances, something like that. And then it also includes a solution video. In this case, there's no solution video because we're just going through a concept or the various concepts and using it in this example where we look at a picture and we go through how we would look at that picture and then compare it to what we would do in Tensor Flow when working with a convolutional neural network.

0:42Alright, so you got this, go ahead and check out the picture, the description and answer the questions and then you're done. And until next time, I hope this has been informative. I'd like to thank you for viewing.

Frequently asked questions

What does the Explore Deep Learning Foundational Concepts lesson cover?

The lesson compares traditional programming with machine learning and deep learning using the input X to output Y model structure, and shows where deep learning, generative AI, and LLMs fit within AI and machine learning. It then builds a basic neural network in TensorFlow with the tf.keras Sequential API. It also explains forward propagation, loss functions, backpropagation, and gradient descent, how a convolutional neural network processes an image with MaxPooling2D, and the NLP model workflow from preprocessing through evaluation and inference.

What skills should a team member have before starting this deep learning lesson?

This lesson follows the Introduction to Machine Learning course, so the learner should be comfortable programming in Python and familiar with libraries such as pandas, scikit, and TensorFlow. The course is designed for teams with Python and basic machine learning experience who are moving into TensorFlow-based deep learning.

How long does the deep learning foundational concepts lesson take?

The lesson runs about 44 minutes. It is one part of the Introduction to Deep Learning course, which IT Directors and Training Managers should plan at about 34 hours per learner.

Do learners need to set up Google Colab to follow the neural network examples?

The trainer writes the TensorFlow code in a Colab notebook, and learners can copy that notebook or create a blank one at colab.google.com while logged into a Gmail account. Writing the code is optional for this lesson, since a team member can follow along and complete it without opening Colab.

How does the challenge at the end of this lesson work?

Because this skill is mostly conceptual, the challenge asks the learner to review a picture and description and answer questions about the concepts covered. It connects how a person looks at an image with what a convolutional neural network does in TensorFlow, and unlike the code-based challenges elsewhere in the course it has no solution video.

How can a Training Manager use this lesson as the start of a team deep learning path?

This lesson sets the foundation for a course that moves learners from foundational concepts and environment setup into applied model building, performance improvement, transfer learning, sentiment analysis, and forecasting. Training Managers can assign the course as a cohort path with CBT Nuggets Playlists and use Team Reporting to track per-learner progress and completion across the team.

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.

What's next?

Ready to keep going?

For your team

Bring this training to your team

See how CBT Nuggets helps IT teams close skills gaps, hit compliance targets, and prove training ROI.

Book a Demo
Just need Deep Learning?

Learning on your own? Browse individual plans ($49/month, billed annually) →

Not ready to buy?
with no purchase required. Already have an account?
Book a Demo