Learning about Generative Adversarial Networks on Udacity | 100 Days of Code 11

Days 49-55 of a 100-day coding challenge covering Udacity's Deep Learning Nanodegree. The creator learned generative adversarial networks, anomaly detection, and collaborative filtering while building a Messenger bot and launching a gym-listing website.
Chapters
Guten Morgen! Ahojou gazymus! Or good morning! It's day 49 of the 100 Days of Code, and yes, I know I wear the same hoodie almost every day, but that's because, you know, well, if it's not getting dirty, why do you need to wash it? Like, I don't, I don't try to use as many clothes as possible, but I'm kidding. I just passed, uh, project 4 on the Udacity machine deep learning course that I'm doing. Check it out. Meat specification, so nothing special. We've got Got good feedback. And then a whole bunch of resources here on how I can learn more. So I've got an incredible amount of reading to do. What am I up to today? Well, I'm doing week 9, all the classes for the machine learning course on Coursera taught by Andrew Ng. He's also started a new deep learning course. Well, it's coming up soon. deeplearning.ai. I'll link that in the description as well so you can check it out. It's just a a front page, a landing page at the moment. That's what it's called. But yesterday I was learning all about Python on Treehouse, almost finished the Python, Python track on Treehouse. And so yeah, everything's coming to, coming to an end. So the courses, I'm in this final, the second last week of the machine learning course. I've got about 3 weeks left of the Udacity deep learning nanodegree foundations. Almost finished the Python track. So I've got to work out what I'm doing next. I haven't got an exact route of where I'm going, but I know it will be in the field of data science, machine learning, or deep learning, more specifically towards communication, something, something in that realm. But I'll hit you up once I learn about it. I've— it's 49 days into the days. I've got 51 days left of the 100 Days of Code. But it's obviously going to keep going after that anyway. And you know, the thing about filming on an iPhone is that when you get a phone call, the thing cuts out. So yeah, 51 days left of the 100 Days of Code. Still filming on the iPhone because my digital camera, I haven't got a new lens for it at the moment. Trying to spend less money more than more money. So I might try and find one on Gumtree for cheap or something like that. But no excuses, we're getting it done. I'm gonna go learn about some machines and I'll catch you in a few clips. A few seconds. Big day of machine learning today. I still haven't finished the programming assignment though. That's the last thing I need to do. But I went through all of these lectures here. It takes me a while to go through them because I like to take an abundance of notes. Check out what I learned about today: anomaly detection, Gaussian distribution, probability distribution. Gaussian distribution is otherwise just known as normal, so like just a normal curve. What else? What's anomaly detection used for? Fraud detection. So like, say for example you're an online bank and you have millions of okay transactions, then all of a sudden you've got one that looks a bit weird. Or for me, exactly, right? Like if I was buying things in Brisbane for months on end and then all of a sudden I have a massive charge over in some other country like Tanzania or something like that, I don't know, somewhere in the other side of the world, my bank might go, "Oh, that's probably fraud, so we won't let that transaction go through." Or in manufacturing, say you produce 100,000 iPhones, like what I'm recording on now, millions of iPhones, and all of a sudden one has some weird thing going on with it. That's where you can use machine learning and sort of anomaly detection. And of course, how I just explained it is a big overview, but that's, that's essentially the gist of it. Just a really small number in a large dataset. So only a small amount of positive, positive samples. What else did I learn about? So when to use anomaly detection versus supervised learning. So supervised learning, you have a large number of positive and negative examples, both labeled. Whereas anomaly small number of y 1 positive examples. So 0 to 20, so really small amount. What else do we learn about collaborative filtering algorithm, which is similar to what like Netflix or a book recommending system would use. If there's a lot of users, they can take all the, the user input of ratings on movies and whatnot and create recommendations for other people. So say for example, you have a group of people who are interested in romance movies and they're upvoting a whole bunch of movies, the collaborative filtering algorithm might realize that, hold on, they're upvoting these movies, so these movies must be related to romance. Let's recommend them to other people who are interested in romance. So that's pretty cool. And yeah, that's about it. Collaborative filtering algorithm and, what was it, anomaly detection. Yeah, see, I've done 4 or so hours of this and I don't know, It's gone up one, in one ear and out the other. That's why I like to take so many notes. I have to review these at the, I don't know, end of the course and go over it again. I think I'll go through this course more than once. But something really cool just got released on Coursera as well. Check this out. I'm excited for this actually. $65 a month for unlimited access of all the courses on there. So when I plan my data science slash artificial intelligence slash machine learning master's degree over the next 6 or so months, Coursera may play a big part because $65 a month for unlimited education, like that's, that's cheap. Like my university degree, I still owe like $35,000 or something like that. I don't even know. I don't even know how to check it, to be honest. But yeah, $65 a month for all this access to learning, highly recommend. So I'm done for learning today. I'm gonna go edit a video. I should really be uploading. I'm gonna upload on Fridays, podcast and a vlog. So that's what I've worked out is best for me, uh, just fit in with my learning schedule and then writing as much as I can on the 100 Days of Code series. Be sure to check that out, it's on Medium and it's going to be in the description. But I'm going to go play, I'm going to go have some fun, might play my brother in chess or something. So we'll catch you tomorrow, day 50. What's good y'all, day 50 of the 100 Days of Code series and it is about 9:30 at night But I've had an amazing day. I was working on, actually I was facing resistance this morning. What does that mean? Well, I just procrastinating, right? When you don't want to do something or where you do want to do something, but you sort of doing everything else instead of doing that one thing. Um, but eventually I got around to working on my Messenger bot that I'm building, which is kind of like a personal trainer, uh, slash nutrition coach, uh, in a Messenger bot. So I'll link that down here. In the description. It's called the Move More Messenger Bot. Um, now I'm doing some reading just in bed. It's Ray Dalio's, a book by Ray Dalio, who's the CEO and founder of Bridgewater, which is the one of the largest hedge funds in the world. It's called Principles, just a whole bunch of life lessons that he's learned. It's so valuable to learn from other people, guys. Like, reading has changed my life. Like, why would you want to learn these lessons when you can learn them vicariously through other people? And then for the rest of the day, before I started reading, before I went for a dog walk, before I went for a dog, had dinner, I was working on my website. It should be live now. It's useanygym.com, also in the link in the description. Ideally, if everything goes to plan, maybe it will become the Airbnb for gyms. Who knows? Will it work? I don't know. I'm gonna keep working on it one every Friday for the rest of this year at least. And see where it gets to. But that's it for day 50, working on projects. Friday I've reserved for projects. Watch this space for see what comes next. But tomorrow, machine learning assignment and then, I don't know, I think I'm heading out with my brothers, but we'll see you then. Good morning, y'all. It's day 51 of the 100 Days of Code series and I just finished my 8th, I had to think about that for a second, I really need to get ready when I do these videos. Actually, it's the 1st of July. We're almost halfway through winter, which is exciting. I'm still in my pajamas, as you can see. But I just finished, first thing I got up Saturday morning, I got up and I finished my 8th machine learning assignment. Check it out. Submitted 9:14 AM. That's going to be the majority of my coding done. There's 2 weeks left in this machine learning course, and then I'm not sure what I'm going to do after. I'll figure it out though. I'm going to do a, I don't know, a syllabus for myself in terms of learning data science and machine learning and AI and whatnot over the next 6 months or so. But I'll fill you in. So what am I up to the rest of the day? Oh, I'm going to do my newsletter. So check out my website, mrdeburgh.com, if you want to get that. And then a workout. I gotta learn about GitHub. Clip for vlog. I have to write all these little reminders to make sure I get everything done. I keep it visual on my whiteboard, but that would be the majority of coding done for today. We'll catch you tomorrow. So day 54 of the 100 Days of Code series, and I've been learning about— where is it? Go up here— GANs. Generative adversarial networks. So what's the whole principle behind GANs? Well, essentially you've got a generator network and a discriminator network. So you've got two neural networks that work against each other to work out some sort of input, uh, output. So they take an input, uh, some sort of real data will go in, and a sample bunch of data will go in, and then the generator network its goal is to fool the discriminator network by generating fake data, and then the discriminator network has to decide which is the real and which is the fake data. And look here, so this is the exercise I did. It's— we started off with some, uh, MNIST dataset. I keep forgetting what they're called. And then so that imports a whole bunch of numbers, handwritten digits. We go down here, and so trained two networks to work against each other, and this is what it produced. It produced it out of nowhere. So you got these numbers, you can sort of see a 1 here, a 9 here, a 9 there, and we go down, and this is what it came up with at the end, some, some scrambled digits. It starts with, with nothing, and the 1, 1, 7, 7, 7, 1. It gets pretty good by the end. And here's the final output: 9, 8. So what's the idea? Well, the generator tries to produce fake numbers, and then the discriminator looks at the original dataset and goes, hey, are these fake or are they real? And it tries to match them with the probability distribution. And of course, my explanation is not the best at it, but An analogy I like to think of is imagine the police and some criminals. And so the criminals are making fake money, but the police can keep finding out that they're making fake money. So you can imagine the police as being the discriminator network and the criminals as being the generator network. And so over time, the generator gets better and better, which is the criminal, at making fake banknotes, and the police get better and better at detecting the fake banknote. Banknotes, and then eventually the, the criminals have no choice but to make fake banknotes that are virtually the exact same as real banknotes so that the police can't differentiate from it. And that's the whole idea with GANs, is that they— the generator becomes so good at generating new data that the discriminator can't tell what's real or fake, and then it produces this new data completely on its own. And there's a lot more to learn about GANs, but that's what I've learned so far. I've gone through the GANs class on Udacity all of today, and I'll probably go through the videos again a couple more times just to get my head around the concept because it's so new. But concept, like, this is, this is really powerful stuff. This is like one of the newest things in deep learning. It only came about in 2014. So imagine like a generative network, and by generative it means bringing this stuff out of, out of nowhere after training on so much data. Imagine it, like, you can apply it to anything. Like, imagine you could go Hey Siri, get me a— get me a— sorry, I got interrupted. But yeah, imagine if you could just ask Siri to generate you a video of Tupac teaching you calculus, and all of a sudden it goes to the internet, finds videos of Tupac, finds videos of like Khan Academy of, I don't know, them teaching calculus and combines them together. And all of a sudden you've got, you've got 2Pac on your screen here teaching you calculus. So that would be amazing. I mean, of course, that's, that's a few years down the track, but they're already— if you watch Siraj's video, I'll link it in the description. He's generating completely new video clips out of using GANs. There's videos of, of people turning horses into zebras. Yeah, this is crazy stuff. But for the rest of this evening, I'm gonna do some writing. I didn't do any filming yesterday or the day before. Yesterday I was learning all about GitHub. Still trying to get my head around using Git and GitHub and whatnot. I want to get my projects that I'm working on onto my Git— GitHub portfolio. There's nothing on there at the moment except a few basic things, but I'll work it out eventually. And then Sunday, of course, I spent writing. You can, you can check out what I did actually. It's on, it's on my Quora profile. I'll link that in the description as well. But we'll catch you tomorrow. It's day 55 tomorrow.
More from Daniel

Small Language Models (SLMs) Are the Future: Fine-Tuning AI That Runs on Your iPhone

Introducing Sunny - A MedGemma-Powered Skin Health Tracking App (Kaggle Competition Entry)

Benchmarking: NVIDIA DGX Spark & NVIDIA RTX 4090 | Part 4 - Comparing the results

Benchmarking: NVIDIA DGX Spark & NVIDIA RTX 4090 | Part 3 - Running LLMs on the RTX 4090

Benchmarking: NVIDIA DGX Spark & NVIDIA RTX 4090 | Part 2 - Formalizing the tests

Benchmarking: NVIDIA DGX Spark & NVIDIA RTX 4090 | Part 1 - Creating a series of tests

Local Multimodal RAG on the NVIDIA DGX Spark | Part 4 - Publishing our demo to Hugging Face

Local Multimodal RAG on the NVIDIA DGX Spark | Part 3 - Putting it all together


