deeplearning.ai Sequence Models Course Progress | Learning Intelligence 21

Daniel Bourke works through the Coursera Sequence Models course, building an RNN that generates dinosaur names, a Shakespeare poem generator, and an LSTM that improvises jazz from MIDI data. He discusses how deep learning already improves hospital diagnostics by 10% and wants to apply AI to preventive health instead of reactive treatment.
Chapters
Hey Siri, play my shower playlist. Okay, playing playlist shower. What's going on guys? Welcome to Learning Intelligence episode 21, and this week's episode is all about sequence models. So using AI to deconstruct data over time scales. And that's the driving force. Sequence models are the driving force behind technologies such as Google Home, Alexa, and Siri. And I think voice is going to be the next big epic platform. This is an expanding space, and I had a lot of fun this week learning some awesome things. The past 2 days I haven't really got much done, and that's because I've been saying yes to different things, and things have come up, things I had to take care of and whatnot. I woke up this morning, I was feeling, feeling pretty down. I was pretty down on myself. I'm like, I should have been doing this. I'm not hitting, not hitting the goals I set for myself each day. I was writing about it because I was kind of having a conversation with myself. That's what I do every morning in my journal. And I realized I come to a conclusion, can be too harsh on yourself sometimes because you got to be, you got to be your own harshest critic as well as the same time you've got to be your own biggest supporter. And I realized it came back to a point that I read in one of my favorite books of all time, Love Yourself Like Your Life Depends on It by Kamal Ravikant. And I wrote down would I be treating myself like this if I truly loved myself? And which I do, of course. It's taken me a while to get to here, but I realized if, if I'm being this harsh on myself, it's not reflecting the fact that I truly, I truly love myself and I'm my own biggest supporter. So I do believe you have to be firm on yourself, but you also have to realize that things are going to come up, things are going to get in the way. You're always going to hit your goals or whatnot. You may have study goals, you may, for my example, you may not hit them or all the time, but as long as you keep putting one foot in front of the other, you keep making little incremental goals, come back to it, which is what I'm going to do today. I've got some time I've blocked out. I've closed my door. Door to my room's closed. I'm gonna spend the next couple of hours getting back on track, and I think that's probably the most important part is that we will have times in life, this is like a philosophical digression from the normal content you see. That's a big part of my life too. I love reading philosophy and learning about different ways of how to live. So, I believe it's important. You gotta be firm on yourself. At the same time, realise these stumbles will come and get back on track, alright? You can get back on track. That's, that's the most important part. If you can get back on track and get back to where you were and set yourself a few goals and slowly start getting, building that momentum back up, well then, what are you worried about? What are you so worried about? And that's, this is sort of a reflection to myself, a lesson to myself. And so, I'm going to get back into it. I know what I have to do, set myself some work for today, and I realised if, if I can't get it done all today, because I've sort of backlogged a few things that I wanted to get done in the last 2 days. And if I can't get it all today— done today, that's all right. Tomorrow's another day. We're going to keep pushing forward, guys. I'm heading into my local Startup Hub. There's an event on AI and healthcare, 2 of the areas I really love and where I want to get into. And so I'll film some stuff there if I can. And when I get back home, I'll show you what I've been working on. It's really cool. Well, I find it really cool anyway. So just got home from the AI and healthcare meetup, and it was Awesome. Some really great insights into— there was one of the professors at the Gold Coast Hospital, which is a major hospital near my home city. He was giving a talk on how he's currently— well, how he's foreseeing how AI can be implemented into his hospital. They're already starting to see deep learning models on the data-rich hospital— like, the datasets in hospitals are incredible because they just, they just collect so much data. They're seeing deep learning models improve some of their, they use logistic regression on most of their data. And so, the deep learning models are already improving them by up to 10% in some cases. And for that, like the healthcare, the amount of money that goes through there, that 10% in saving or 10% in just, not even in money actually, in patient diagnosis, rather than giving someone a cookie-cutter healthcare plan, it's really moving towards how do we tailor a specific plan per patient. How do I treat this patient, the one I've got in front of me, rather than averaging a whole bunch of treatments from someone else? That sort of stuff really excites me. That's what I want to look at. To me, the hospital is sort of a reactive measure. I would prefer, having a nutrition and fitness background, using AI to work on principles to prevent someone from getting into a hospital in the first place. So that's where my goal is, is to use AI in healthcare in that space and really let people live the healthiest version or become the healthiest version of themselves, leveraging AI technologies before they end up in a hospital. So it'll prevent them from getting into a hospital because I don't know about you, but I'm not a fan of spending any time or as little time as possible in hospital. I want to be the healthiest version I can outside of hospital. Let me show you what I was working on yesterday. So this is project 2 of week 1. So it's Dinosaur Island, create a character-level language model, final version. And so what we were doing was using RNNs to take an input of text in this case it was a list of dinosaur names, and output a bunch of new dinosaur names. And this one was my favorite, Littasaurus. That was a really fun assignment. And then the next part was we used a bunch of Shakespeare text, analyzed that, and then we put an input into the RNN and used the data from the Shakespeare text to produce a poem based on that input. Let me show you mine. We'll find it down here. So there we go, there's the man himself, William Shakespeare. And I'll read this out for you. Here is your poem. So the input I used was "I love artificial intelligence." I love artificial intelligence by Daniel Bourke and William Shakespeare, courtesy of a recurrent neural network. I love artificial intelligence, so confond test mest mose as yet bead, and de chop de I held mol nom mom I fall astore, that funder lorras o wonkor su of payet. My ole is my betays ever loj for furtey. Is death the quiet forsaid with the fall? But bum lay ever not pair of nom heel ot essity fey. Prove the wongness so hot to mine ander. Thought des kill Clive, sence can that side ot. Nor word to 'Ac wörte with derard, that I kit.' Almost sounds like Lorem Ipsum. I think that's really cool. Even though it was virtually gibberish, the structure of the poem is there. So, it started off with 'I love artificial intelligence.' Who knows if it uses this to produce that properly. At least the lines are intact, the words are actually the size of words, so that's why I could actually read it. If it wasn't, if they weren't that size and they didn't have vowels in the right positions or most of the words, I wouldn't be able to read it at all. But check this out, we go up here, pass that one 100% out of 100%. And where are we up to today? Oh, so today I'm going to be working on jazz improvisation with LSTM. And one more thing I want to show you is this book by Francis Cholette. I think I'm saying his name right, which is from the authors of Carers. I got recommended this book on my Medium on one of the comments of my post. And I'm reading it so far and it's incredible. So I haven't decided yet if I'll buy it, the whole thing, but I'm reading the sample chapters. I think there's a few free ones here. What is deep learning? Look at that. There's so much information there. Before we get started, the math of neural networks, that's free as well. So I'll leave a link to that in the description. Up coding early this morning because I'm meeting a friend out for breakfast, really close friend of mine. So I'm excited to see him and talk about the stuff. I'll probably talk about the stuff I learned at the meetup last night. That was really fun. Probably more on that meetup, or not the meetup, sorry, but AI and healthcare in the future. Future. So stay tuned for that. Oh yeah, check it out guys. So I've just passed the final assignment of week 1 of the Coursera programming assignment, Jazz Improvisation with LSTM. It's the third project in week 1 of the sequence models course, and that's of course what this week has been all about. But that's boring. Let me show you what, what I actually did. We go into this Jupyter Notebook here. This assignment was improvise a jazz solo with an LSTM network. So ideally we were going to send our friend a copy of a brand new jazz solo. I can't play any musical instrument. I should be able to, that's really, that'd be really fun. But anyway, I can use AI to play them for me. So this is the initial dataset. So we will train an algorithm on a corpus of jazz music. So this is a little example. Can you hear that? We go DJ mode. All right, so that was the, that was the input, and that's, that's well and truly already above anything that I could ever do on my own unless I devoted lots and lots and lots of practice to that. So what did we do? Well, we grabbed a few samples of that, and then we built an LSTM or an RNN network. We'll go through here. I'll skip through some of the details there, but essentially this is the type of network we were, we were building. So we had input LSTM cells, outputs, and then these outputs would be forwarded to the next cells and continue on and continue on. And then we go down here. Once our model was trained, here is my output of my own brand new jazz file. So let's hear how that sounds. It's like I'm in an elevator. I don't know if my friend would really appreciate this, but, uh, it's for you, friend. So that's really cool. That was the assignment for the week, and that was really fun. Like, that's— that to me is something that it just shows the power of AI. For example, I don't— as I said, I don't know anything about musical instruments. I'm probably offbeat, especially with my dance moves and whatnot. But the fact that we can use AI to help us with these things is what really excites me in the future. It means that, uh, people in certain fields, if they don't know how to do things, they can recruit the power of artificial intelligence if the human intelligence isn't available to give them a hand. Imagine in the future I could just ask Siri, like I did at the start, to generate me an entirely new playlist that no one's ever heard before, just for me, just for my own personal interest, and it's, it's making it up on the fly. That's something really cool and potentially something you'll see in the near future. What are the takeaways from that project? I'll show you here. Here's what we should remember from that project: a sequence model can be used to generate musical values, which are then post-processed into MIDI music, which is essentially just a music file. Fairly similar models can be used to generate dinosaur names or generate music. That's what we did in the last project. And then in Keras, sequence model generation involves defining layers with shared weights, which are then replaced for the different time steps, because of course a sequence model is over time. And now that's going to wrap up Learning Intelligence 20 1. Let's get into some shoutouts. Alrighty then, so these beautiful people have reached out to me on one way or another, either via email, daniel@mrdbourke.com, or Twitter @mrdbourke. I almost forgot my own Twitter handle then, that would have been interesting. Or YouTube comment, of course, you can leave a comment below. Anything you send to me, I'll definitely do my best to answer your questions. Ask me whatever you like. What did I have for breakfast last week? Good question. I can't really remember. I think it was potentially a protein pancake, but I made a video on that. Check that out if you want. Anything you like about AI, fitness, health, life, I'm happy to do my best to answer your questions. And if you want to leave a comment below, that way other people can check it out. Without any further ado, thank you so much to Saravanan. Thank you for your kind words, Saravanan, and all the best with the Deep Learning Nanodegree. I know you just signed up to it and I know you're doing it at the same time as work and you're almost looking to I think you're looking to move on as well from your job and break into the world of deep learning and AI. So all the best with your learning journey. If you have any questions for me, of course, if I can help out in any way, let me know. Hamad, thank you for the great question on last week's YouTube video, last week's version of Learning Intelligence. So what are my plans after I finish my machine learning and deep learning learning journey, the AI Masters curriculum? It isn't completely set in stone, but I know the trajectory I'm heading on. Once I finished my curriculum, once I finished through all the courses, I'm looking to move into the AI and healthcare space. So what does that mean? Well, I want to join an AI and health startup or an AI and health face-focused tech company or create my own. So of course I'm looking for a, for a job somewhere in the field of AI, particularly in health. But as whether it's through my own startup or through someone else's, We'll see how the future plays out, but of course I'll bring you guys along with me for the journey. And last but not least, Shaikh Asad. You've started your own YouTube channel, you're making guides on GitHub, you're, you're an absolute wizard. I had a conversation with Shaikh a few days ago actually, or a few weeks ago, I posted the video on my YouTube. He's an amazing AI developer, 14 years old from India. He's, he's going to change the world. He's definitely going to change the world. I look forward to meeting you eventually in person, but As for, for your support, I can't thank you enough. I really appreciate it. So thanks, brother. As for plans for next week, next week I'm going to be jumping into the final 2 weeks of the Sequence Models course. I plan on finishing the Sequence Models course on Coursera by the end of next week, potentially by the start of next week. And then from there, we'll be going back into the Udacity Artificial Intelligence Nanodegree. So I'm having a really great time and learning so many amazing things. And as I said in the video earlier on, sometimes it does get a bit hard, and I know I do portray a really excited personality on these videos, and that's generally how I am, but don't get me wrong, you still get up those days and you sort of— it takes a lot to get into it. And what's important is not to be hard on yourself when that happens. It's to just put it— write down what you want to do and write down the next actions that you want to do and just slowly work towards those goals, because sustained effort over time is is what will get you towards those. I almost forgot the question of the week. It's going to be a new segment I'm going to put at the end of each video. This week's question of the week is, if you had a choice to use sequence models to build some kind of technology, let's say you built an Alexa skill, what would it be? Leave a comment below and I'll shout out the best comment in next week's video. Keep learning. I didn't stuff that one up. Yes. See you later.
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


