 Okay, hi everybody. Thanks for joining. This is a entirely optional presentation which I'll call a lesson zero which is all about how to fast AI. It's all about how to get the most out of this course, how to make sure you finish it and how to make sure you feel like it's been a productive time. And the reason I'm doing this is because a lot of people who take the course, when they get to the end of it, they say to me, oh, it wasn't until I got to the end of the course that I realized how I should have done the whole course and now I'm going to go back and redo the whole thing over again. And so I'm going to tell you about what the messages I've heard are, about what people have found the best approaches to making the course work. I'm also going to go through the actual mechanics of how to get set up with two systems, Google Colab and AWS EC2 and talk about why you might use one versus the other. So a lot of people now, as in many hundreds of thousands, have gone through the fast AI practical deep learning for coders course and many, many, many of them have gone on to create successful startups, to write research papers with high impact factors, to create new products at their companies. It's a pretty well proven course at this time. But there's also a lot of people that never finished the course. And so if you're watching this, it's because you've decided you do want to learn deep learning. So I'm going to talk a bit about like what's what's it going to take for you to be one of the people that that makes this into a great experience. When I talk about the course, I'm also talking about the book. So just to be clear, there's there's a book that Sylvain Gujarat and I wrote, which you can either buy from Amazon, and people like it happily, or believe it or not, you can read the whole thing for free. So it's called fast book. It's a fast book repo. Honestly, I make basically nothing from the books. I don't feel like you need to buy it to say thank you or something buy it if you want the book. If you're happy using notebooks, use the free one. It's all good. So the book was actually written as Jupiter notebooks. And was we wrote something to turn it into a book book. Now the book also by the way actually looks great on Kindle online as well as paper. I know often technical books don't. This one actually does. And then the course goes through half of the book. And so quite soon we'll do a part two, which we'll go through the other half of the book plus some other new stuff. But basically each lesson covers a chapter or so of the book. So if you're doing this course, you'll be going through the book, at least in the notebooks. And you might want the paper one as well. So here is the main thing that you should commit to right now, which is to finish the damn course, right? And or finish at least half of the book. Because everybody I think who joins comes in thinking, okay, I'm going to do this. I'm going to do deep learning. But if you when I look at our YouTube analytics, a lot of people don't finish. Okay, so you just need to decide what day are you going to watch the course each week? What day are you going to do the assignment? What day like how are you going to stretch your time to finish the course? And maybe you're coming in deciding I don't want to finish it, which is fine, right? You know, if that's your intention upfront, no problem. But if your intention is to be a really effective deep learning practitioner, you need to finish the damn course. Okay, so put it in your head that that's your goal. Talk to your friends or your spouse and tell them that's my goal. Get that social pressure that you're going to finish it. And you're not just going to finish the course, but try to finish a project. Right? So Christine McLevy is one of our fantastic alumni. She's now at OpenAI, one of the world's top research organizations. She built a fantastic system for creating new music with deep learning. She used to be a pianist herself. And I remember this discussion. I told her focus on making one project great and polishing it off and finishing it. And she did. And that project has ended up creating music which the BBC Orchestra played. And amongst other things helped her get this extremely exclusive job at OpenAI. So this is a clip from a podcast with one of our students, Sanyam, and Christine in which Christine is saying this is one of her key insights. And so I've got to be giving you a few key insights, some of which are from me or some of them are from me via students. But they're all like things I've heard a bunch of times. And so this is one one example. So finish the course and finish a project. The project doesn't have to be something no one's ever built before. Maybe it's just like, Oh, I really love that thing that person built. Gosh, it would be a real stretch if I could build it too. You know, great. Or it doesn't have to be world changing. You know, so one of our students built something for his fiance, which was a cousin recognizer. He had I think 14 cousins. And so his fiance could look at it could take a picture of one of the cousins and it would tell them which cousin it was. Right. In our first course, one of our students built the app for the Silicon Valley TV show, which did hot dog or not hot dog, which was actually a huge smash hits like millions of downloads that it was written about in the media. And it did exactly one thing just to tell you whether or not something was a hot dog. Anyway, or it could, you know, solve medicine that would be fine too. I mean, whatever. So finishing the course means being tenacious. And one of the things I hear a lot is a lot of the approaches people learn as they do fast AI around how to learn and how to study are useful more generally. And in fact, this is a quote from our book, the number one thing I see the difference between successful deep learning practitioners and and not is tenacity. Okay. And tenacity is on the whole something you can choose. Now, something you can't choose is whether you find yourself in the middle of a global pandemic, or, you know, somebody in your family dies, or you come down with a terrible cold or whatever, like obstacles happen. Right. And so part of being tenacious is being understanding with yourself. Right. And saying, okay, something's happened. I can't do what I hope to do right now, but then getting back to it. Right. So part of tenacity is not about ignoring the bumps, but keeping going after the bumps. And maybe that's, you know, quite often, I'll have a bump that's like a year long. Right. But if I've decided to finish something, you know, at the end of that year, I'll go back and finish it. It's sometimes that involves me emailing somebody more than a year after they sent me something and saying, okay, I'm ready to reply now. And they forgot that they even sent me an email. Okay. So what I'm going to do now is I'm going to share with you a bunch of insights from this book called meta learning. If you haven't seen it before, that's okay. It came out yesterday. And it was written by a guy called Reddick who is one of the top alumni of this course. And it's a book well worth reading because his journey is extraordinary. You know, this is a guy without a degree who couldn't code just a few years ago with a job that he found boring. And he set out to learn deep learning and repeatedly failed to do so. But Reddick is extremely tenacious. And each time he failed to do so, he tried again. And eventually he figured out a way to do it. And the way he did it was very intensely based on fast AI, both the course and the philosophy of learning. And he is now a Kaggle competition winner. He was the only non San Francisco person at QAI, which is one of the world's top medical AI startups. And now he works at a new nonprofit that is literally trying to translate animal language. So he's kind of a good example. I always think it's a good idea to have a role model in the fast AI community. There's a lot of role models. And so here's somebody who's both a role model for failing, trying, failing, trying, failing, and then finding some success. And so I'm going to show you some things from his book. And a lot of his book is him, him taking stuff I say and kind of casting it into what he took away from it. Some of it's his ideas. So one of the things we hear again and again from unsuccessful deep learning students is they keep preparing to do deep learning. And they keep preparing to do projects. So they study linear algebra. They study calculus. They study C plus plus. They study all these different things. They do a MOOC and then another MOOC and then they read a book and then another book. And at what point are they actually going to start doing something? So the fast AI philosophy is you start doing something week one. So week one, you need to actually train a model. Which is not to say that you're not going to learn theory. You will, as needed, in the context of getting stuff done. And so if you do finish it, particularly if you finish the full two parts of the course, you'll have implemented basically all of fast AI's library just about from scratch. You'll know all about batch normalization. You'll have benchmark various matrix multiplication approaches. You'll know how to write bare metal GPU optimized code. You'll understand how to do back propagation and the calculus of that from scratch. You'll do all of that. Okay, but it'll all be as you go along in the context of like solving a particular problem or understanding the next piece of the puzzle. So yeah, really just reading books and watching videos is not going to get you there. The thing which is going to get you there is writing code, doing experiments and training models. Some of you might not be that great at coding. Fine, okay, that's a perfectly okay place to be. But you guys are going to find it the most challenging because being good at coding is the thing that lets you zip through quickly. So rather than think, oh, that's a shame. I'm not that good at coding yet. This is actually an opportunity because now you have a really fun project to learn to code in. So a lot of people have become good coders by doing the course because as you do the course, you'll learn about a lot of computer science concepts like object-oriented programming and functional programming and mapping over a list and list comprehensions and GPU acceleration and so on and so forth, right? So the thing is though, if you're not, if you come across a computer science concept or a programming idea or a piece of syntax that you're not that familiar with, that's a place it's worth pausing for a moment and making sure that you do understand how that code works because the coding is the kind of critical foundational skill. This is a pretty good course for getting started with basic computer science. It's Harvard CS50 course, which everybody at Harvard does for computer science to get started and that's all available for free online. So I would recommend, well, and so would Radek, start there and so these quotes are all from Radek's book, by the way. And then the other piece, so Radek talks about this four-legged table of the things that are going to help you do your deep learning experiments more effectively and efficiently. And these are the ideas, like knowing the basic ideas around code, knowing your tools, so an editor, Jupyter Notebook, knowing stuff like get, like how to save your work and pull in other people's work and so forth, and understanding kind of SSH and Linux, like how to access a server and manipulate it and do stuff with it. So there's this great course called the Missing Semester of your CS education, which was actually created, I believe, by students at MIT who said, oh, everybody at MIT is assuming we already know this stuff, but a lot of us don't. So there's nothing to be ashamed of if you've never used Git or you've never used SSH, you know, or whatever. They're just tools, which at some point in the journey, most people just kind of have to figure out. So this is actually a great time to do it, and this is a great course to use to help you get there. And of course, again, the main thing is to practice these tools. So that's the kind of foundation around coding and your kind of development environment. The next big piece of advice, which we talk about a lot in the course and that Redeck talks about in his book, is sharing your work, communicating your work, and writing about your work. This is something that a lot of people feel very uncomfortable, like tweeting or blogging or whatever. It's like, who the hell am I to start writing about deep learning? I've just started. Well, here's the thing. No one is better placed than you to write for, like, what would you have wanted to know six months ago? So you now know more than you did six months ago, and you'll know more in a week, and more in a week, more in a week. And so if you've got a background in, say, the hospitality industry, you could probably write something very interesting for your colleagues in the hospitality industry about ideas around deep learning, for example. Or if you teach at high school, you might have ideas that you can write down about what high school students might find interesting or teachers might find interesting. So everybody's got something to say. And the key thing is to write it down because that is going to help embed your understanding a lot better, and it's going to start to build up your portfolio. And so we'll talk more about that in a moment. But a lot of people have found that this message of sharing their work has been a critical part of their journey of learning and of also building up their personal brand that has ended up getting them a job. Okay. So what does it mean to do a fast AI lesson? So a fast AI lesson is basically a chapter of the book or one video from the course, or both. So what does it mean to do one of these lessons? Assuming you're doing the video, then it means, okay, obviously watching the video, so there's a couple of hours, right? And then it means running the notebook, which we'll look at in a moment. When you run the notebook, you have the whole book with all of its code and all of its outputs there, you're playing with it. You should experiment, right? You should try things out. So if you wonder, oh, why is this done before that? Well, try removing it. Try doing it in a different order. If you're wondering, you know, what would happen if I did that, but this to this other image, try it, right? The more you can start to experiment, the more you're feeding your brain with these kind of like your own deep learning happening in your brain, input, output patterns, you try something, what happens, you try something, what happens. So after that, the next step is to try to reproduce the notebook from scratch, okay? Now, you're going to have to look things up, obviously, but the idea is, can you, with a fresh new notebook, can you you, can you go back and recreate some of those models, retrain them or redo some of that data processing pipeline? So try to like type it in yourself, you know, you can switch back to the answer as much as you like, but you're really trying to start to actually, you know, fill in your own, write your own code. And then what you really, the point you really want to get to is repeating some parts of the lesson with a different data set, which you collect or download. Now, this whole process often takes people a number of times through the course, right? So often the first time through, people might just watch each lecture and try and kind of run it, and, you know, just get to the end to get a kind of a general sense of what's going on. So people will often kind of go through the whole thing like three times and then come back and try to go further and further, right? So don't worry if you can't do all this right away, certainly in lesson one, that's going to be challenging. Just take it as far as you can, right? And as you go along, try to push yourself to do more and more, and you can even go back to an earlier notebook and see if you can understand more and more of it. So let's take a look at what that looks like. So here's the course, okay? And here's the lessons, which you can watch. And then here are the places you can run the notebooks. So there's two types of platform for running the notebooks. There are notebook servers. These are things that as soon as you click into it, the actual environment we use, you put a notebook, will pop up, and you can just start running it pretty much straight away. So that is obviously the easiest. Colab is free. Gradient has a free tier, and SageMaker is not free. So we're going to look at Colab today. The other option is to use a full Linux server, and this is something where you're going to have to basically set up Linux and install the Python system and install notebooks and get the code from GitHub and run the server and log into SSH and do all that. That's obviously a lot more work. You might want to skip it for now in like lesson one, but I would recommend at some point you go through this path. And the reason why is that in real life at your workplace, or if you do your own startup or whatever, this is what you'll be doing. You will be interacting with a Linux server using SSH that's running a GPU, and you'll want to understand how it all works. And once you're using your own Linux server, you'll suddenly learn about all these productivity enhancing tips and tools that make your life easier. So I'll be showing how to set up AWS EC2. That's the Amazon platform today. You'll find Google Cloud looks very, very similar indeed. Jarvis Labs was created by a fast AI alum, and this is probably at this stage the best value of the full Linux servers. So that would certainly be also very much worth checking out. One good thing about AWS, so a couple of things, AWS is currently the most popular platform for cloud computing. So it's very likely that whatever company you're at or end up at is already using it. They're also pretty generous with credits for startups and students. So even though it can set you back 60 or 70 cents an hour, you might well find you can get a few hundred dollars worth of credit through your school, or even a few thousand dollars worth of credits through their startup programs and so forth. So let's have a look at what Colab looks like. So Colab, it's wonderful how easy it is to get started. You literally just click on the chapter, so let's do chapter one, and it pops up Colab. You can pay, I think it's $10 a month for Colab Pro to get longer sessions and more likely that you'll get a better GPU, but for most people you'll find the free version is totally fine. One of the biggest problems with Colab is that it's not persistent, which is to say when I go to this notebook, it thinks it's never seen me before. Nothing's set up for me the way I want it. But we've set up the notebook so that the very first cell actually installs everything you need. So if I click this little run cell button here, it will run the cell. Although what I will do is I'm going to pop over to Colab here, and let's also read the steps here. And actually it says here before running anything you should tell Colab you're interested in using a GPU. So if you find that when you run a cell from the course, and it's going to take like half an hour or an hour or more, it's very likely you forgot to use GPU. The GPU runs things many hundreds of times faster. So all you do as it says here is go run time, change run time type, and say GPU. Okay. So now I can run this cell. And this is all Python code, except lines that start with an explanation mark are actually sent to a terminal. Okay. So PIP is something that installs Python software, and Fastbook contains all of the Python software necessarily necessary for the course. And so it's going to go away and set it all up. And so this is this like mildly annoying bit. You can then connect Colab to Google Drive. And that's going to be how you can save your notebooks and save your work as you go. Okay. I'm not going to do that right now. But if you go to this link that it says, and it'll give you a code, and then that'll connect it up to your Google Drive. And so at this point now, everything for the course is now available. And you can see the whole book is here. Okay. So here's the book. And you can open up sections to read them. Okay. You can go to the table of contents. Okay. And so eventually we'll get to this cell here, which contains all the code needed to run a model. So if I click run, here is where it goes. Now, this is going to, it's amazing how much this little bit of code is going to do. It's going to download tens of thousands of pictures of dogs and cats. It's going to use a simple rule to recognize the dogs from the cats based on their file names. Basically the way that this, this has been set up is that you can tell from the file name whether it was a dog or a cat. It's then going to download something called a pre-trained model, which is something that already knows how to recognize various types of images. It's then going to construct, that's going to then going to train that model to make it particularly good at recognizing dogs from cats. And then it's going to validate that model to see how good it is at recognizing dogs from cats using a set of pictures that it hasn't seen before. And that's all happening. So far it's already downloaded the dataset. It's already downloaded the pre-trained model. And it's now busily going through the first epoch, which is to look at every picture once to try to learn how to recognize dogs from cats. And that's it. The line starting with a hash are just comments. Because this is also the source of an actual book, there's a few like slightly weird comments that you can ignore. They're just things that are used for setting up references in the book. There's the caption, so forth. Okay, so it's now testing out, I think that first epoch. Okay, so it's finished epoch. And so far it's got a 1% error rate. So after 54 seconds, it has learned to recognize dogs from cats with 99% accuracy. And so, yeah, we're going to let that finish off. So that's how we get started with Colab. Okay, and there's nothing else to set up. Now, what you can do is you can open notebook. And you can open a notebook from GitHub. And here is the fast book repository. And you'll see in the fast book repository for every notebook, there's a second copy inside the clean folder with the same name. So I was just looking at 01 intro. There's also a clean 01 intro. If I open that up, you'll see that it's got exactly the same thing as the last one I was just looking at. But all the pros is now missing. It's just got headings and code. Also, all the outputs are missing. So the reason that we have this clean version is to help you with these stages here is our suggestion is once you've gone through the lesson and you've run the notebook and you feel like, okay, I think I get it, is you open up this clean version. And before you run each cell, try to think, okay, why is this cell here? What's it for? What's it going to do? What's the output going to look like? Right? So once you remove all that context, this is a good test for you to kind of get your brain going to think what it was actually going on. So this is a kind of much more active approach to reading and recall. And so then once you've done that, and you've finished going through this, at the bottom, one thing that is kept is the questionnaire. So at the end of every chapter is a questionnaire. And so then at this point, you should now, as much as you can without looking, go through and try to answer each of those questions. They all have answers in the notebook, in the book. Okay, so you can, you know, if you can't remember, you can always look it up. But you know, if you can't remember, that's a sign to you that like, oh, you know, did I skip over that bit too quickly? Like what's happened that I've not remembered? And then try to remind yourself and then go back and finish the questionnaire. Okay, so there's a lot of pieces to help take this from a passive, I'm just watching a video, I'm just reading a book into a participatory exercise that you're a part of. Okay, so as soon as you can, we want you to create something that's yours. And so this is the easiest way to do that, is basically at the end of lesson one, once you kind of up and running, try to do it with your own data set. And if you go to forums.fast.ai, which is something that you're going to be deeply familiar with, because this is going to be full of people just like you, other people who want to learn deep learning. Okay, and these people are all asking questions and making comments, and you can see there's like a lot going on all the time. And so you can see here's the part one course topic. And you can see there's 1.4,000 topics there and each one is going to have lots and lots of replies. So this is where, amongst other things, you'll find, if you search for it, something called share your work here, which has 2000 replies. And you can see links to and pictures of lots of examples of things that other people have done after the first week or two of the course. And so hopefully that might help give you some inspiration. Okay. And it would be great if you could reply and add, you know, a picture or link to what you build. And you'll see, you know, everybody is very positive to each other on the forums in general and in this topic in particular. Nobody's going to go, Oh my God, I could have done that years ago. Right. People are going to be excited for you that you have now joined the ranks of people that have built their first deep learning model. And I will be excited for you. So as I said, Radek, this is again from his book, expresses in his book a way of not doing fast AI, which I have heard now probably hundreds of times. I don't know why this is so common, but many, many people do what Radek did, which was basically to learn all these math things. Right. So he started with calculus. And then once he got to a certain point in calculus, he found that he had to start understanding real analysis. And then as he started understanding real analysis, he found he had to learn set theory, you know, and you get the idea, right? If you want to learn all of math, that's going to take a while. There's a lot of gatekeeping out there that says like, Oh, if you're going to be a real deep learning practitioner, you have to finish, you know, a graduate level course in linear algebra. Here's the truth. The actual linear algebra you do in in basically all deep learning is matrix multiplication. And if you've forgotten what that is, that is multiplying things together and then adding them up. Okay. So what you need to be able to do is multiply things together and add them up. Right. So if you can do that, you're good to go. So yeah, don't get, you know, you're not going to finish it. If a you never start it because you keep preparing or be you keep thinking, Oh, I wonder exactly what's happening here. And you go all the way down to the bottom until you found yourself in the midst of set theory. Right. Don't worry, you'll get deeper and deeper over time. But if you're learning mathematical theory, you're not coding, you're not experimenting, you're not practicing, you're not actually building deep learning models. And if you're watching this course, and your goal is not to build deep learning models, you're in the wrong course. Okay. And if your goal is to build deep learning models, then don't do this. So as Renek says here, it's as you train actual models, that you're going to get feedback. Right. And the feedback that a lot of people get is, Oh, my God, I can already train useful models. Like a lot of people are surprised at how early on they can actually get astonishingly good results. Okay. So, so, you know, jump in and be open to surprising yourself that you can do a bit more than you thought. You can't do everything right away. Okay. But but start that feedback loop of figuring out what do you know, what can you do? What can you get working? What can't you get working? So one of the key things that you're going to need to do if you're going to finish all of the course is become even better developer than you are now, even better coder than you are now, wherever you're up to. And so to do this, you need to read code and write code. The fast AI source code is designed to be extremely readable. So you can read that code. You can obviously read the code in the notebooks. But yeah, you want to be spending as much time as possible reading and writing code, and particularly reading and writing deep learning code. All right. How do you find out what's going on in the world of deep learning? And how do you get yourself on the map of people doing deep learning? The probably the best answer is Twitter. For those of you whose only knowledge of Twitter is the Kardashians and Donald Trump, this might come as a surprise. But actually, to create this slide, I opened Twitter and I copied and pasted the first three tweets that appeared on my screen. So one of them is somebody has a discussion about costs and impacts of different approaches to labeling. This is a fast AI alum who's a 17 year old PhD graduate who's doing well, who shows how to mix pie torch and fast AI. And then Hillary Mason, who's a professor, I guess not a professor anymore, but now an industry talking about organizational issues in data science. So there's a whole world out there of machine learning on Twitter. And if you want to get your work noticed, that's a great place to do it because really everybody's there. And if you want me to highlight your work, that's where I can see it and I can retweet it. So yeah, Twitter is a really good place to be. If you're just starting with Twitter and you don't know who to follow, go to my Twitter, go to my likes and go through my likes and find tweets that you think you actually like that tweet to and then follow the person who did that tweet. And pretty quickly you'll have 100 people you're following and then they'll retweet things and you'll find other people you like. And before you know it, hopefully you've got a nice big lot of interesting deep learning stuff to read every day. At first you'll understand like 1% of it, which is fine, but you're there, you're in it and it'll be all washing over you. And you'll start to find the people who write stuff you find engaging and interesting. And you'll also find the people that actually you don't and make sure you unfollow them so that you don't have your feed, have stuff you don't care about. So then beyond Twitter, you want to start blogging. And again, blogging is not about writing what you had for dinner. It's about writing something that you of six months ago would have found interesting. So you know more than you did six months ago, so write that down. We have something called fast pages that makes it ridiculously easy to start a blog. And so there's no reason for you not to, you know, at least create a blog. There we go. And one of the nice things about fast pages is you can even turn Jupiter notebooks into blog posts. So it's great for kind of technical ones. So this is what a fast pages blog looks like. This is a fast pages blog about fast pages. I had to write fast pages in order to write the fast pages blog about fast pages. But basically, and one of the other nice things, it's all in Github, right? So it's, as you're blogging, you're learning more about Github. It's all written with markdown, which is something that you're definitely going to need to know anyway. So as you're blogging, you'll be learning about a lot of the tools you need to learn about anyway. So one interesting idea for things to blog about is this example from Amanorora, who is an Aussie fast AI alum who is now working at weights and biases, which is one of the top AI startups in the world. This is a really interesting kind of blog post what Aman did was he took a video that I did at the launch here of the Queensland AI Hub and he wrote down what I said and that's an example of something that you could do. If there are videos out there that you liked and nobody's turned it into a post, be the first to do so because there's all these benefits. When somebody sends me something saying, I've written up this talk you gave, I'm very grateful to that person because now my talk is now available in a second medium and a lot of people prefer to read rather than listen to a talk. That person's taken the time to do this, they've taken the time to have me check their work and kind of everybody ends up winning from this. So I've seen with Aman's post about my talk, it's got attention from people that my talk did. So for example I noticed on my LinkedIn feed the CEO of Data61, which is the CSIRO, so the top data science body in Australia, highlighted it and said check out this post. So this is like an example of the kind of stuff you can do, try to be helpful and at the same time you're also learning. So there's an example of an interesting kind of blog post which very few people are writing and so there's a huge amount of opportunity here for you to practice your writing. Now what is the difference between machine learning and other kinds of coding? As Radek says in this chapter of his book, the key about machine learning is that we can generalize. We can train a model with one set of data and apply it to a different set of data and still get good results and everything just about that we're doing in this course is all about creating models that are going to generalize well and we're going to be learning about how you can measure how well your model generalizes. So answering these questions about can we trust our model to be correct on new data that we feed it is absolutely critical to every model that you build whether it be in a Kaggle competition or a little prototype or a production model you're creating at work. One of the most important things here is creating a good validation set and this is something that you'll hear about in lesson one of the course but you know I really wanted to highlight it here as did Radek in his book it's a really important idea is you need a good way to measure whether your model is any good so you need a data set that really represents what kind of data is your model likely to have to deal with in real life. And my partner Rachel wrote this really great blog post on the fast.ai blog about this. Actually interestingly you know this was kind of came out of a lesson that I did at the University of San Francisco and then Rachel turned it into a blog post and Rachel's blog post has ended up much more influential than my video ever was you know so this is actually a good example of what I was talking about and she took it a lot further. Okay the next key thing that Radek mentions and I totally agree with is it's hard to write correct machine learning code. I always assume that every line of machine learning code I write is wrong and I'm normally correct about that it normally is wrong because there's lots of ways to be wrong and unlike creating a you know a contacts management app on the web whatever it's much harder to see that you're wrong you know you can't see that the name didn't get stored in the database or you can't see that the title isn't centered right often it's wrong that it's going to be like half a percent less accurate you know or your image is upside down but it's kind of maybe you didn't even look at it I got straight into the system and you end up with something that can only recognize upside down images or whatever. So whatever you're doing you know whatever you're building a project make sure you start with a simple baseline right like create the simplest possible model you can that's that you know solves the problem so simply that you can't have made a mistake. So often that'll be like just taking the average of the data or if there's two groups take the average of each of the two groups or you know something that's something really really simple and then you can gradually build up from there. So another very common beginner mistake with projects remember we want you all doing projects is somebody in a project group will say oh I read about this new Bayesian learning thing with these clusters and this you know advanced transformers pipeline and we could put all that together and it's going to be better than anything before and they then spend months creating this complex thing and at the end it doesn't work now why doesn't it work well I don't know it's so big and so complicated maybe it was a stupid idea maybe there's a bug in one piece of it maybe that one piece there shouldn't be there but it should be somewhere else I don't know right that's not how anybody creates successful machine learning projects. Machine successful machine learning projects are always built in my experience by creating a simplest possible solution that gets something all the way from end to end first and then very gradually it makes it incrementally slightly better okay so keep that in mind right you might feel a bit silly when you build that first model that just takes the average of the data right but that's how that's how the pros do it that's how everybody that actually gets it to work does it so often I've had you know Silicon Valley startup hot shots come to me and ask me to like check out their amazing new startup and I'll ask them you know oh you reckon this can separate you know second people from well people or whatever have you taken the average of each of these two groups and compared that to your model example and they'll say oh no and then they try it and they find out their models worse right so you need to know whether your model is actually doing something useful. For projects one of the things you might want to do is join a cargo competition that might be the last thing you see yourself as doing is being a cargo competitor but actually this is one of the best possible projects you can do because to enter a cargo competition even to come last you have to go through the entire process of downloading a data set formatting it into the right method ready for a model getting it through the model saving the output getting it into the correct submission format and submitting it back to Kaggle right so getting a model actually up onto the Kaggle leaderboard it's really going to test out your end-to-end understanding right and once you've done that you can start to iterate you can start to make it slightly better slightly better slightly better so although in a lot of ways Kaggle is not representative of the real world you know you don't have to worry about deployment you don't particularly have to worry about kind of inference speed stuff like that and a lot of ways it is closer to the real world than you might expect and that it really does force you to go through the whole process and also to think about engine about kind of planning your project carefully so enter a competition with your kind of goal that I want to win right now obviously on your first one you're not going to win but the whole point is it's a competition so you're going to try to do your best right and so to do your best join a competition that's early right give yourself plenty of time and every single day try to make a small improvement um and then you'll find that but you know if you keep reading the forums on Kaggle and keep in trying a bit more every day you'd be amazed at the end of the three months how much you've learned how much of the stuff that at the start you thought this is I have no idea what's going on and then you'll realize oh suddenly I I do know what's going on and you might find you get in the top 50 percent which might be better than you expected so that this is you know highly recommended at some point during this course is have a real go at a Kaggle competition so at the end of all of this you might be looking for a job um now this could mean a number of things um a lot of people just want to bring some deep learning into their current job um and so you know that's if your organization's already doing some deep learning that might be easier than if it's not if it's not you might just have to start prototyping some things and try to build up some kind of you know proof of concepts internally um or maybe you're going to try and go out and get and get you know get a new role um as a researcher or a data scientist or whatever um most people are not going to be able to rely on their you know um Stanford PhD to get them there right um most people are going to rely have to rely on their portfolio so your portfolio is going to be all the stuff you build along the way it's your footprint on the deep learning community and that footprint is going to include you know think things like your contributions to the fast ai forums and your tweets and your stuff on discord i would say pretty much every one of the fast ai alumni that have come to my attention as being thoughtful and effective community members all have very very very good jobs now um and so like people really really notice this footprint right so your your blog posts your um github projects these are the these are the things that are going to get you a job um they probably won't get you a job at a big company a big old company in a you know kind of standard established it job right that's going to go through hr and hr or got it like they're not going to understand any of your github code or know any about your community impact they're just going to know about credentials right and you'll come up against somebody with a stanford phd and they'll get the job right but um startups particularly startups from other people who've got similar backgrounds of which there are many are going to appreciate you or companies that don't really have an established ai group yet or the startup you built yourself well certainly appreciate you right um so it's um oh the the more you've got a portfolio and that you can show that you've really built stuff the better and so start early um another reason to finish um this first course is that it's going to allow you to do the second course and if you're doing this live part two we're going to be doing actually a whole new part two towards you know basically shortly after this is finished right so if you if you finish this and do a good job of it then you could actually be one of the first to do part two now um we've seen how easy colab is to get started we've also talked about some of the downsides of it right it's it's kind of ephemeral you start from scratch every time you've got this kind of hacky stuff of saving notebooks into your google drive blah blah blah um aws on the other hand is going to give you and google cloud and javaslabs and so forth are going to give you a real linux server okay and um it's going to cost you javaslabs is the cheapest about 40 cents um aws i think about 60 cents us per hour um it's not going to send you um broke um but it's you know it's not nothing um but it's a good idea to to try it if you can and i'm going to show you how to get started there and what we might do um my call is i'll do some q and a while things are running so i'm going to head over to aws ec2 okay um so one of the tricky things about aws is they've got hundreds of products this is amazon web services and they all have names that are totally meaningless okay so uh you just have to know ec2 is the name of the thing that you go to to read to computer okay so they don't call it amazon computer rental they call it ec2 um so the first thing you need to do is you need to um sign up to aws um and one of the things that uh they get is a lot of fraud um so a lot of people try to use their gpus to mine bitcoin um so you have to ask them uh to give you permission to use their gpus and that's called requesting a service limit increase um so you'll need to follow the steps here to ask them for a limit increase if you write these exact words with this exact formatting uh it might come through a little bit quicker um if you're from a country where there's a lot of fraud um you might not even get this permission um maybe javas labs it's going to be easier i'm not sure javas labs even has the fraud check so anyway there's quite a few places you can you can try to get a an instance so if aws has a problem with your quota try somewhere else um but generally speaking most people should get a response pretty quickly saying you've now got approved so for you doing this course if you're going to try out aws ec2 i suggest you log in and request this service limit increase right away so that you know by the time you come back tomorrow the next day it'll be done and so what i'm currently doing is i'm on course fast ai and i've gone selenic servers aws ec2 and we're following through that project process okay now um to log in to your server you're going to need to use something called ssh secure shell so this is something where on your computer screen that server's computer screen effectively is going to appear and the stuff you type is actually running on that remote server not on your computer um nowadays pretty much nobody uses usernames and passwords for um ssh instead we use um something called public key cryptography which is where you basically have a secret number um which only you know and then there's another public number that you tell other people and basically there's a really cool math trick which allows um people to check whether you have the secret number without actually anybody without actually telling them the secret number and the person so that's called um so that's what an ssh key is um so there's this thing called a public key and that's the number that you're the code that you're going to give to anybody you want to be able to log into and then there's your private key which you're going to keep for yourself so um you're going to need um a terminal um so um on windows um in the store there's something called the windows terminal which microsoft provides for free which is pretty good um mac has a terminal that comes with it linux has a terminal that comes with it um so i'm using windows um but it'll basically look the same for everybody um now on um windows you need a uh ubuntu linux shell um not a normal windows shell uh so to do that you need something called wsl windows subsystem for linux and that will give you a full ubuntu system on your windows computer it's again it's free that only takes a couple minutes to set up so there's a link to how to do it here so once you've done it um whatever whether you're on mac or linux uh or windows it's going to look basically the same right and so uh you'll create your ssh key by following the instructions in the documentation which is basically you run um ssh key gen and it's just going to go through and create these two files um so you just run it it creates these two files and so this is the one that we have to give amazon and this is the one that we're going to keep for ourselves so following along the documentation here um it says to click on services ec2 find key pairs yeah okay and then we'll go here import key pair and whatever aws and this is where we're going to find the that id rsa pubs that we just created and you can see this here it is right it's just a big long code and it's fine you can all look at this this is public not secret this is the cool thing right there's no passwords and I say import and so now we have an ssh key and we can use that to log in okay so this is just all this is here's all those steps so um renting a server in aws speak is called launching an instance so launch an instance we'll scroll back up to the top to instances and we will say launch instance okay and it'll say okay what kind of thing do you want to run amazon linux or windows or red hat or whatever I strongly strongly suggest you use ubuntu and the latest version which is currently 20 so I'm just going to say select okay and then it'll say okay what kind of server do you want um for playing around there's actually one that you can get for free right it doesn't do it's pretty it's kind of slow right but for learning about ssh and linux and stuff this is actually a great one to use um it's no good for deep learning it doesn't have a gpu so if I go to g4dn that's the cheapest kind of good gpu's we can get and I'll get the smallest one there g4dn x large and then I'll say next next so how big a hard drive do I want I normally say about 100 gig launch and launch and so now it's going to say okay um when you log into this which key pair you're going to use okay so you just select the one that you just imported and say yep I I I know that I have that and then launch and you'll see del says this has now been initiated it's got a code so this is the thing that I've just launched if I click on it here it shows me here's my instance okay um so as you if you haven't done much with servers and linux and ssh and stuff there's going to be this whole world of new stuff for you to learn about but this is an opportunity it's not a problem so if you're not familiar with things like ip addresses that's cool there's lots of tutorials around at the moment but for now just know this is the unique address like a street address that your new computer has and so we're going to connect to it so this button here will click will copy that address okay so we can then go to our terminal and we can type ssh and paste in the address and then the only other thing I do need to do is I need to say um provide a username and um aws always uses the username ubuntu for all of its ubuntu images so you say ubuntu at and then the ip and so if I now press enter we're in okay so now everything I type here is actually being typed on that remote computer so for example to list the contents of a directory I type ls okay so the thing I'm actually typing into here is bash a bash shell so bash is something other of these things need to be familiar with and you can learn about it in that missing semester mit course I mentioned you know it takes takes a few weeks to get somewhat comfortable with bash it's a very different feel to using a GUI if you're more familiar with explorer or finder or whatever but you'll find it's you'll be much more productive soon enough because you can replicate things quickly you can script things you can copy and post things and so forth anyway so here's my here's my computer um it's going to sit here running until you tell it not to even if you turn your computer off your server's still running and that means you're still paying for it okay so one of the things I guarantee you're going to learn the hard way by wasting money is that you're going to forget to turn it off okay so to turn it off you're just going to go stop instance okay um so you make sure you you do that all right let's see how we're going here so we've launched our instance and we ssh'd into it okay so um keeping a linux server up to date and running used to be kind of annoying um but um luckily uh I've created something called fast setup for you which makes it easy and all you need to do is copy this and paste it into your terminal and this is one of the really cool things about linux and using bash is like in windows or with mac finder you'd have pages and pages of click this and drag that and scroll here um but I've just gripped with the whole thing so I'm just going to go ahead and paste it over here and it's off okay now what this is going to do is it's going to fully set up this linux server it's going to make it automatically update with the latest software it's going to um configure it all correctly and so forth and it's going to ask a minimum number of questions so I'm just going to show you the questions it's going to ask you it's going to ask for a host name so a host name is just a more convenient way to access a server and so you can basically write anything you like as long as it's got at least two dots in it so I'm going to call this um course test dot fast dot ai for example okay and then after an email address now the email address um is basically just goes what it's it's where it's going to send kind of error logs and stuff too so maybe we'll say info at fast dot ai okay uh do you want to set a password probably do so hit enter for yes so I'm going to put in a password asks you to type it again okay um reboot automatically when required I'll say yes and that's it okay so that's all the information that it needed so behind the scenes what's actually happening here is it's grabbed the latest get repo from fast setup and it's running this thing called Ubuntu initial and you know this is something you can check out if you're interested it's basically 125 lines of bash script which is going to set up your firewall for you set up ssh security for you set up your swap file for you set up your ssh configuration for you install all the software you need for you set up your logging and upgrades for you set up your password and post name for you okay so it's going to do all that and you know this is the kind of thing that if you you know from time to time you can just might think oh I'm interested in how x works and since everything is open source you can just go in and see how x works and at first none of this might make any sense and so you go oh all right let's pick something and learn about it enable firewall ufw oh what's ufw copy paste ufw probably not united farm workers uncomplicated firewall did Jeremy mentioned firewall okay what the hell's a firewall and you know you could start reading right um and then you could be like oh or maybe firewall tutorial often adding tutorial can be helpful okay so you know you can start to just jump in here and there okay don't get too distracted we want to spend as much time as possible training models but this is how we learn about our tools okay so um this is now going and downloading the latest version of all the software that it's going to need from Linux so maybe good time for questions if we have any Michael what's your current opinion regarding Swift and Julia as replacements of python so um Swift is basically out now so uh google has basically uh archived the Swift for TensorFlow project so um you can safely ignore that um yeah Julia's Julia's interesting you know I I think it's a lovely language nothing has the ecosystem that python does so you know if you use Julia you're going to have to figure out a lot more stuff on your own and you'll find a lot more hard edges but I do think at some point python's going to have to be replaced and Julia seems like one of if not the most likely thing to replace it or maybe it won't be replaced by Julia maybe to be replaced by something else that's kind of python like jacks which actually takes python and compiles it using something called xla into a much faster thing than python otherwise would be okay do you think that um deep learning or more traditional ml or stats approaches are more useful for traditional industry applications right now um so before I answer that question I'm going to press y which is going to reboot our computer now that it's all updated and obviously when we reboot that that computer running at the aws data center um it closes the connection because it's busy rebooting okay so we'll give it a couple of minutes um there's not a single good answer to that question um um and you don't really need to answer that question because basically any time you want to uh try uh any kind of machine learning model on a problem you should try a few different algorithms and um switching from a random forest to a gradient boosting machine to logistic regression to deep learning is you know an extra half hour so um you should just try a few different approaches um I find personally for me deep learning is increasingly turning out to be the easiest thing to get started with and gives me the best results for most projects I seem to do nowadays um but you know they have a look at like Kaggle competitions from time to time there are still things where gradient boosting machines work better or very often people use both and ensemble them um but yeah it's not a question that you actually need to answer because it's you want to get to a point where it just takes you a few minutes to try another algorithm out and so you don't need to be wedded to one or the other um so I'm just going to see if I can I don't know how long it's going to take to reboot so I'm just going to I just pressed up arrow to get back to my last ssh command and I'll press enter and we'll see if we're back we're back okay so this is finished rebooting um oh actually this time it says to do something slightly different which is to add this minus l here this is the thing that's going to let us connect to um Drupal notebook so I'm going to type exit to exit from the server and this time I'm going to add the extra bit of the command uh there we go okay and all right so the next thing is we're going to install something called mini condor mini condor is a very nice um uh distribution of python the programming language um a lot of people have bad experiences of their computers getting really confused with python packages and things conflicting and all kinds of stuff like that um that's because um pretty much all the major operating systems now come with a version of python that is used by your computer for you know important operating system tasks you should not be using that python to train your machine learning models leave that python alone right um you should always install um mini condor um which is going to give you your own version of python which has nothing to do with your operating system as you can play around with as you like um it's really easy just you can delete the whole folder and create it again in like three minutes you can create new environments which is like little testing grounds you can try different things um this is yeah very strong recommendation is um to make sure that you uh install even if you're just playing around on windows or a mac not on a server um install mini condor it's cross platform you can use it everywhere and use that python okay so um mini condor is now installed so we now have our own python setup so the last uh setup step is we have to install uh drivers for the gpu and jibuntu actually comes with something that figures out for you what the best drivers are for your device so this is just what this step here is and so i'm going to look down look here it says recommended okay so here's the driver i want okay um but what i actually recommend is you use that but also the one add the dash server to the end um that's going to make like not install the stuff for playing computer games or whatever okay so let's go ahead and run these lines of code this is the bit here see this is 460 depending on your graphics card when you run this you might have some different number okay but since i wrote this today it's still 460 so we'll go ahead and do that and this is going to go ahead and install this oh um sudo sudo is um a special thing you can add to the front of a command that runs it as an administrator okay so um some things um you know by default commands you run basically can't break your system right um whereas things like installing new software um you have to tell it to run it as an administrator so and when you do that it'll ask you for your password and this is the password that you put in just just a moment ago in the setup there we go okay let's keep going is there a section of the course that people skip over too quickly um yes um part two yeah not enough people do part two um and the difference between part one and part two is the difference between um being a pretty handy practitioner you know who can who can do some pretty good work as long as it's in reasonably well established kinds of areas um and versus being somebody who understands how everything's put together you could you know if you're told to create a deep learning model on in a domain that's like there are no published models you'll be able to create one if you'll you'll understand how to create models which combine multiple different data types um you know you'll it's it's it's yeah it's it's a really great thing to to finish and yeah not enough people realize how much is is there and just the later lessons in in general you know it can like after you've done three lessons you you are pretty handy and you'll feel pretty handy right but it's it's pretty easy to stop there because it feels like okay I I get it you know I can train a model I get what's going on um and to be fair it does very dramatically kind of scale up in terms of intensity after that because in lesson four you'll have to write your own optimizer from scratch and you'll be getting into the calculus and stuff um but you know it it it is a big difference in terms of what what you can do and what you understand so I think in general you know not enough people are getting deeper into the lessons okay so um this is now finished installing the Nvidia drivers um normally at this point people say to reboot but there's actually a magic thing you can do which means you don't have to reboot and the Nvidia provides something called Nvidia SMI which will tell you about your installed GPUs and so if you run it and it pops up anything at all other than an error it means that you are you successfully have your GPUs installed so in this case we have a tesla t4 um it's currently 36 centigrade in there and the most important thing to know about is that it has 15 gigabytes of memory of which we're using nothing at all and there are no processors currently running on the GPU so if you're finding something's going very slowly and you're wondering maybe it's not using the GPU you can always run Nvidia SMI and if it says no running processors found you're not using the GPU okay um okay so one more setup step which is we have to install all of the software all of the Python libraries needed so PyTorch, FastAI, Jupyter Notebook and so forth and so I've created a package which has that whole lot it's called Fastbook um if you're if you've used had a condor or mini condor before you might be surprised who says Mamba rather than condor um you should definitely use Mamba and not condor it's way way way faster so um anytime you see something saying condor install you should instead type Mamba install it's way faster okay so um off it goes Mamba is now going to install all of the all this Python software getting installed for us um PyTorch is um well over a gigabyte so this is going to take a few minutes just because it has to download that that whole thing and um yeah that can take a while so while this is going do we got any more questions Michael? Do you recommend any software for experiment tracking? So um the most popular experiment tracking software would be um TensorBoard and Weights and Biases experiment tracking software is stuff which will basically um you can use a FastAI callback and you basically will say train whilst tracking with TensorBoard or train whilst tracking with Weights and Biases and what it'll do is it will um kind of create a little database showing you all the training results from all the different experiments you've run um and create some little graphs of them and so forth um personally I don't use any experiment tracking software and the reason I don't is I found that many many many people just about everybody I know who uses them finds it incredibly distracting so the trick to training models is don't watch them train so if you've done any C programming it's like don't watch it compile right go and do something else preferably set up your next experiment okay um experiment tracking software just makes it so tempting to look at all the pretty graphs in my opinion um so I would suggest get it running leave come back when it's done and there should be a bit of reason you are running that experiment so check whatever that reason was right um having said that um if you're really sure you need the services of experiment tracking software for what you're doing um and there are some things that genuinely need it uh then I think weights and biases is the best at the moment uh I think it's really great and furthermore they've hired lots of fast AI alumni and they're super nice people so definitely recommend that the um so that's all the installation so the last step is just to grab the book the notebooks um and so you use something called get clone to grab a repository of code and this is going to grab the fast book repository um paste so you can see it's saying cloning this repository and so you'll now find that there is a fast book directory so you can cd into it and there is our book okay um okay so I think something um anaconda is going slowly so we're not going to wait for it to download um but um so I want to show the very last step but the very last step is to run a notebook and uh then you'll be able to click on the url that pops up and it'll bring up something that basically looks um just like we saw in colab but the nice thing is everything you um save um like everything you do will be remembered so all of your experiments are going to be there the data sets you download is still there um so on and so forth um so that's that's that um so when you're done it'll remind you here to as I mentioned before stop your instance so you can either choose stop in this menu or you can choose stop here or personally what I quite like to do is to run sudo remember sudo is this thing that runs as an administrator shut down halt now and so that shuts it down from here without having to go into the aws gooey and there we go okay so if we look back at the um ec2 here um in a moment this will switch from running state to stopped state um okay so I think that's everything Michael is there anything else we need to cover okay okay great um all right well thank you everybody for listening in to um lesson zero um and um I look forward to hearing how you go with lesson one and seeing your um projects that you create and don't forget to get involved in the forums if you do get stuck with something the first thing to do is to search the forums um because out of the hundreds of thousands of people that have done this before somebody's probably got stuck in the same way before so hopefully they can answer your question uh otherwise feel free to ask your own questions and hopefully somebody will answer for you all right thanks everybody bye