Tensorflow Tutorial for Python in 10 Minutes

Ғылым және технология

Want to build a deep learning model?
Struggling to get your head around Tensorflow?
Just want a clear walkthrough of which layer to use and why?
I got you!
Building neural networks with Tensorflow doesn’t need to be a nightmare. If you follow a couple of key steps you can be up and running and using Tensorflow to predict a whole bunch of stuff. In fact, you can learn how to do it with Python in just 10 minutes. By the end of this video you’ll have built your very own Tensorflow model to predict churn inside of a Jupyter Notebook.
What you'll learn:
1. Build a simple Tensorflow model to predict Churn
2. Training the model and make predictions on test data with Pandas
3. Save your model to disc and reload it to a Jupyter Notebook for reuse
Chapters
0:00 - Start
0:18 - Introduction
0:26 - What is Tensorflow
1:03 - Start of Coding
2:47 - Importing Tensorflow into a Notebook
3:48 - Building a Deep Neural Network with Fully Connected Layers
7:13 - Training/Fitting a Tensorflow Network
8:24 - Making Predictions with Tensorflow
9:15 - Calculating Accuracy from Tensorflow Predictions
9:50 - Saving Tensorflow Models
10:09 - Loading Tensorflow Models
GET THE CODE!
github.com/nicknochnack/Tenso...
Links Mentioned
Tensorflow Documentation: www.tensorflow.org/api_docs/p...
Pandas Crash Course: • Pandas for Data Scienc...
If you have any questions, please drop a comment below!
Oh, and don't forget to connect with me!
LinkedIn: / nicholasrenotte
Facebook: / nickrenotte
GitHub: github.com/nicknochnack
Happy coding!
Nick
P.s. Let me know how you go and drop a comment if you need a hand!

Пікірлер: 225

  • @apollog6793
    @apollog67932 жыл бұрын

    I like how he is doing 10min tutorial but still included a humor intro

  • @NicholasRenotte

    @NicholasRenotte

    2 жыл бұрын

    😆 gotta try to stay a little funny!

  • @ShivanS
    @ShivanS3 жыл бұрын

    These videos are so good. A whole end-to-end project in 10 minutes. And a bit of humour and art tossed in there.

  • @NicholasRenotte

    @NicholasRenotte

    3 жыл бұрын

    Thanks so much @Shivan! Glad you enjoyed it!

  • @shallusharma4687

    @shallusharma4687

    2 жыл бұрын

    #TensorFlow-- python Library #Explanation with Example kzread.info/dash/bejne/oZ6Z2NFxaLW8kag.html

  • @Duhgy

    @Duhgy

    Жыл бұрын

    Yeah but you aren’t taught anything, you cant learn ml in 10 mins I’m sorry

  • @priyam66

    @priyam66

    Жыл бұрын

    @@Duhgy that is just to refresh some basics pertaining to Tensorflow. learning ML requires a hell lot of other steps from EDA to Feature Engineering to Feature Selection to HypterParameter Tuning.

  • @josephmyalla3611

    @josephmyalla3611

    Жыл бұрын

    ​@@NicholasRenotte ❤

  • @adrianp9283
    @adrianp928311 ай бұрын

    Hey guys if your trying out this video in 2023 July like me you need this line changed for it to run X = pd.get_dummies(df.drop(['Churn', 'Customer ID'], axis=1), dtype=float) the dtype=float is the most important was trying to figure why it wouldn't train all morning and just cracked it.

  • @dmotson

    @dmotson

    9 ай бұрын

    very helpful thanks!

  • @shaman3198

    @shaman3198

    9 ай бұрын

    Thank you so much !!

  • @nonoobott8602
    @nonoobott8602 Жыл бұрын

    Absolutely brilliant. End-to-end in just 10 minutes. Very explicit. Thanks for sharing

  • @kyleDoesCoding
    @kyleDoesCoding7 ай бұрын

    This is the most amazing tutorial I have ever watched. I'm not ashamed to say I sometimes require extra explaining but this guy is just spot on with his explanations.

  • @knitronics
    @knitronics Жыл бұрын

    This tutorial is an absolute life-saver. Well done!

  • @campbellmcternan3902
    @campbellmcternan39022 ай бұрын

    I normally never comment on tutorial videos but this was very excellently done! This was exceedingly concise and clear

  • @rowlandgoddy-worlu3382
    @rowlandgoddy-worlu33822 жыл бұрын

    One thing I like about his videos is how basic he breaks down complex concepts for easy comprehension! Having knowledge is one thing but passing that knowledge on is another. Nicholas is doing great at giving that knowledge!

  • @ZiRo175
    @ZiRo1752 жыл бұрын

    hey mate just watched your video and thought it was super useful to my learning. You explain everything very well (look good doing so) and left out the unimportant details. Thank you for this content!

  • @maryrooster8737
    @maryrooster8737 Жыл бұрын

    Thank you! Up until now I've only done old skool supervised learning. With your tutorial I'm ready to enter the big leagues!!

  • @KevinSmith-qt4hz
    @KevinSmith-qt4hz Жыл бұрын

    Although this isn't an actual tutorial, it is cool to see you build a model so quickly!

  • @acb_gamez
    @acb_gamez2 жыл бұрын

    This was awesome man thanks. I got a good understanding of the flow of tensor flow and also the things I need to learn to become proficient. I def need to understand more about the different network types/shapes and their use cases, as well as the activation algorithms. Also is nice to know that I don't need to dive too deep into learning about the backpropagation and calculus because TF takes care of all of that!

  • @michaelareay1037
    @michaelareay1037 Жыл бұрын

    Excellent presentation. Straight to the point, easy to follow and well explained.

  • @winstonyeung1461
    @winstonyeung14612 жыл бұрын

    Sir, as of all your other tutorials, it is so self-explanatory and clearly defined. Thank you so much.

  • @shallusharma4687

    @shallusharma4687

    2 жыл бұрын

    #TensorFlow-- python Library #Explanation with Example kzread.info/dash/bejne/oZ6Z2NFxaLW8kag.html

  • @1jfecteau
    @1jfecteau2 жыл бұрын

    Excellent video! Concise and every step well-explained throughout.

  • @akshitdayal2689
    @akshitdayal26892 жыл бұрын

    A much needed video! Thank you for the great work!!

  • @enewhuis
    @enewhuis Жыл бұрын

    This is a perfect introduction to sharing with people on any team that works with someone working with ML. :D

  • @LongNguyen-ef5qd
    @LongNguyen-ef5qd2 жыл бұрын

    I totally love your dedication on each videos bro !! Thanks for your hard work and keep it going !!!

  • @shallusharma4687

    @shallusharma4687

    2 жыл бұрын

    #TensorFlow-- python Library #Explanation with Example kzread.info/dash/bejne/oZ6Z2NFxaLW8kag.html

  • @NicholasRenotte

    @NicholasRenotte

    2 жыл бұрын

    Thanks a mil for checking it out @Nguyen Long!!

  • @SaptadeepDutta_Ex-Xerox
    @SaptadeepDutta_Ex-Xerox2 жыл бұрын

    Thanks for reaching the heart of the matter (4:07) so quickly and then explaining these '4 lines' so well.

  • @NicholasRenotte

    @NicholasRenotte

    2 жыл бұрын

    Stoped you enjoyed it @Saptadeep!

  • @fastgeorge3104
    @fastgeorge31047 ай бұрын

    Perfect introduction, thanks a lot! Got me over that first big hurdle

  • @nickcampbell9228
    @nickcampbell92282 жыл бұрын

    Didn't need to watch those 2 hours video. With your video, I was able to understand the base and the rest is just research and finding codes I need. This helped so much. Thank you! You are the best!

  • @NicholasRenotte

    @NicholasRenotte

    2 жыл бұрын

    YESSS! Once you get the structuring it's all just a matter of building different architectures where needed!

  • @vikasyaduvanshi2222
    @vikasyaduvanshi22222 жыл бұрын

    Thanx for sharing your knowledge with us bro. U explain so easily and effectively

  • @goboy6882
    @goboy68822 жыл бұрын

    Short and sweet! I'll add it to my memory palace. Thanks again.

  • @user-rj8mk6fz1u
    @user-rj8mk6fz1u Жыл бұрын

    Can you please cover fall detection ? I've been looking for tutorials on it for 6 hours on internet and i couldn't find a helpful resource.. you explain and makes things everything so easy to understand and no one does it like you !!

  • @sumers9396
    @sumers93966 ай бұрын

    your videos are really helping man! appreciate it!

  • @husammasalkhi7817
    @husammasalkhi7817 Жыл бұрын

    Dude, very nice compact video, thanks for making it!

  • @sachinsanand2484
    @sachinsanand2484 Жыл бұрын

    You are the best, Nicholas. Just Brilliant!!

  • @YTantirungrotechai
    @YTantirungrotechai2 жыл бұрын

    This is really useful. Give me a much clearer idea on how it works.

  • @scarleyxo
    @scarleyxo3 жыл бұрын

    Thanks for sharing this! Can’t wait to watch some more of your content.

  • @NicholasRenotte

    @NicholasRenotte

    3 жыл бұрын

    Thanks so much @Scarlett, plenty more to come!

  • @riomorder
    @riomorder4 ай бұрын

    Exactly what I am looking for. Something straight forward

  • @FaroukYahaya-xi4ri
    @FaroukYahaya-xi4riАй бұрын

    epitome of greatness. Fashion Model looking guy having the best ML/AI lessons on youtube! xD

  • @spiritfly8210
    @spiritfly82103 жыл бұрын

    Thankyou so much Nicholas, this is what I was looking for, whole story in 10 minutes, Tq so much,brilliant effort.

  • @NicholasRenotte

    @NicholasRenotte

    3 жыл бұрын

    It's a bit of a crash course but it goes through the basics right?! 😃

  • @tiaantoinette8047
    @tiaantoinette80473 жыл бұрын

    Went along with you and got .8 on the last epoch, but had .78 on the accuracy score. Loved this tutorial; it was so well explained. Thanks!

  • @NicholasRenotte

    @NicholasRenotte

    2 жыл бұрын

    Awesome stuff @Tia, awesome work!

  • @mariuszzacharuk6167

    @mariuszzacharuk6167

    2 жыл бұрын

    I've to say - great stuff, but you must be carefull with input dataset. Because of some missing values in "Total Charges", it's treated as an object instead of series of numbers. This leads to situation, when we feed layer with dimention over 6500 (which is close to cardinaltiy of training set - and this should be huge red flag - at least for example Random Forest prediction models are very bad in this circumstances). After cleaning input dataset, we end up with dimention = 45, which is reasonable in this case.

  • @shallusharma4687

    @shallusharma4687

    2 жыл бұрын

    #TensorFlow-- python Library #Explanation with Example kzread.info/dash/bejne/oZ6Z2NFxaLW8kag.html

  • @mamadouaw3129
    @mamadouaw31297 ай бұрын

    This one video made me subscrib immediately to your channel and like all videos of you ! so perfect and time saving

  • @brianvanvlymenpaws
    @brianvanvlymenpaws Жыл бұрын

    Finally I understood thank you for explicit expansion of those attributes.

  • @sonnybigler8726
    @sonnybigler8726 Жыл бұрын

    This was very helpful. Thank you very much.

  • @davidcordova1773
    @davidcordova1773 Жыл бұрын

    awesome and simple explanation

  • @paulburnett1963
    @paulburnett19632 жыл бұрын

    great job and nice and concise work..

  • @joshlsullivan
    @joshlsullivan6 ай бұрын

    Great video, Nicholas.

  • @petersimon985
    @petersimon98518 күн бұрын

    so brilliantly!!! Very unselfish 🙏💐

  • @mytechnotalent
    @mytechnotalent3 жыл бұрын

    This is brilliant! Well done Nicholas so helpful!

  • @NicholasRenotte

    @NicholasRenotte

    3 жыл бұрын

    Thanks so much @Kevin! If you're interested, maybe check out Object Detection with Tensorflow next! kzread.info/dash/bejne/q6Wfq7WCc6uuXbg.html

  • @vikaspal3384
    @vikaspal3384 Жыл бұрын

    To the mark. Keep going!

  • @hikmetemre6837
    @hikmetemre683711 ай бұрын

    Cheers mate u are doing brilliant things!

  • @anirbanchakraborty69
    @anirbanchakraborty693 жыл бұрын

    So perfectly explained. Thank you

  • @NicholasRenotte

    @NicholasRenotte

    3 жыл бұрын

    So glad you enjoyed it @Anirban!

  • @carlostasaycosilva7739
    @carlostasaycosilva77392 жыл бұрын

    amazing video easy to understand

  • @poe12
    @poe1211 ай бұрын

    Subbed! The video is so good!

  • @shounsalaji8171
    @shounsalaji8171 Жыл бұрын

    absolutly subscribed

  • @emiliocuberos
    @emiliocuberos11 ай бұрын

    Great video, veeery instructive and useful. ¡Gracias!

  • @fukatinsaan522
    @fukatinsaan5223 жыл бұрын

    Okay! This was much needed. Thenks!

  • @NicholasRenotte

    @NicholasRenotte

    3 жыл бұрын

    Thanks so much @fukat!!

  • @pahadianalyst
    @pahadianalyst2 ай бұрын

    This was awesome

  • @Felicia-126
    @Felicia-126 Жыл бұрын

    Great video!

  • @yosaikan
    @yosaikan3 жыл бұрын

    EXCELLENT tutorial. Thank you..

  • @NicholasRenotte

    @NicholasRenotte

    3 жыл бұрын

    Awesome stuff @Mohamed, glad you enjoyed it!

  • @brianthomas9148
    @brianthomas91482 жыл бұрын

    Beautiful!!!!

  • @mariamissa2458
    @mariamissa24582 жыл бұрын

    wow great and fast ! thank you!

  • 2 жыл бұрын

    I am about to choose a major at university as a high school student! you would be the one who has been inspiring me to learn AI! what an amazing channel bro!

  • @NicholasRenotte

    @NicholasRenotte

    2 жыл бұрын

    YESSS, go getem!

  • @notarealhandle123
    @notarealhandle1232 жыл бұрын

    Add to it 1 month to start understanding what it is that you are doing and how to improve your models.

  • @Billy-te3mz
    @Billy-te3mz3 жыл бұрын

    Top video, mate. Usually any Aussie who pronounces data as “day-ta” instead of the objectively superior “dah-ta” won’t win my respect. I’m willing to look past this for you xx

  • @NicholasRenotte

    @NicholasRenotte

    3 жыл бұрын

    Cheers @Billy, I'll drop a "dah-ta" for you in one of the future videos 🤣my US colleagues have given up on trying to convert me!

  • @jiyanshsonofdr.rajesh8516
    @jiyanshsonofdr.rajesh8516 Жыл бұрын

    Great work...

  • @bunnybag5197
    @bunnybag5197 Жыл бұрын

    Good video mate.

  • @livingmybestlife8410
    @livingmybestlife84108 ай бұрын

    Love This!

  • @gustavojuantorena
    @gustavojuantorena3 жыл бұрын

    Another great video 👏

  • @NicholasRenotte

    @NicholasRenotte

    3 жыл бұрын

    Yeayyyahhh, thanks @Gustavo!!

  • @raphroum6486
    @raphroum648611 ай бұрын

    Understood one word out of 5, but this will for sure make me wants to work with it.

  • @ici6308
    @ici6308 Жыл бұрын

    Fantastic !!

  • @pranaliudhan5932
    @pranaliudhan5932 Жыл бұрын

    Yeh,It's Really helpful ,Thank you for the video

  • @aidaisayas3033
    @aidaisayas30332 ай бұрын

    very helpful. made this seem "easy", which it def is not. Thanks!

  • @cmb42
    @cmb424 ай бұрын

    Very helpful

  • @Stqlth
    @Stqlth Жыл бұрын

    QQ: why do you use sequential if the TensorFlow docs say it shouldn't be used if "your model has multiple inputs or multiple outputs"? I saw your csv has a ton of factors and you have one output you are looking for. I have a very similar project where I have nfl game stats and I need to predict if the home team won. Any help is appreciated!

  • @paulbergstedt1892
    @paulbergstedt18924 ай бұрын

    When i tried to run through this exercise i ran into an issue: model.fit(X_train, y_train, epochs=200, batch_size=32) gives errorValueError: Failed to convert a NumPy array to a Tensor (Unsupported object type int). So to get around this - I converted X and y train to float32 X_train = X_train.astype('float32') y_train = y_train.astype('float32') Later i ran into a similar issue with: y_hat = model.predict(X_test) y_hat = [0 if val So again - converted X_test = X_test.astype('float32') Everything seemed to complete as expected with 0.79 accuracy score. Thoughts?

  • @striderQED
    @striderQED7 ай бұрын

    Nice, thanks.

  • @hawaiiisland9656
    @hawaiiisland9656 Жыл бұрын

    Excellent.

  • @protovici1476
    @protovici14763 жыл бұрын

    I remember my grad days for data science and this would still scare me for a test like that lol. Great video!

  • @NicholasRenotte

    @NicholasRenotte

    3 жыл бұрын

    Hahahah, ikr, man I've been working with TimeDistributed layers right now and it's giving me the same nightmares!

  • @terristhompson9860

    @terristhompson9860

    2 жыл бұрын

    How long and time consuming was grad school for data science? Could it be done with a full time data science job?

  • @protovici1476

    @protovici1476

    2 жыл бұрын

    @@terristhompson9860 2.5 years and fairly time consuming given the various complex topics it covered (the college is nationally recognized). You'll need a heavy background in stats/computer sciences to obtain a data science job (a real one not just by name working in just excel or the like). One just can't go straight into becoming a lawyer without education just like data science.

  • @terristhompson9860

    @terristhompson9860

    2 жыл бұрын

    @@protovici1476I’ll let you know if that last part is true or not after my interview next week.

  • @hggaming911
    @hggaming91110 ай бұрын

    This video is awesome, I have two questions because I'm new in Tensorflow, 1- Do we need to encode numeric data in the data sheet before we start building the model?, because I didn't see that in the video. 2- How we can map the prediction results 0, 1 to Yes, No as per the data sheet?

  • @marcoscdf
    @marcoscdf Жыл бұрын

    What does the output "accuracy score" (of ~59%) actually mean on the Churn model? Does it mean there is a correlation between one or more columns from the features and the target variable?

  • @4XLibelle
    @4XLibelle Жыл бұрын

    Thank you! Excellent! May I ask a dumb question? Is this using a GPU? And do you have any videos on how to use the GPU (if TF doesn't automatically use it)??

  • @photomaster1
    @photomaster12 жыл бұрын

    Thank you for this..

  • @midnightrun5
    @midnightrun52 жыл бұрын

    you are a rockstar.

  • @coolstudios8273
    @coolstudios82738 ай бұрын

    Lately I've been developing a large Tensorflow model, and I'm getting out of memory errors, from what I've learned it seems the best solution to this road block is gradient checkpointing, however there is little to no resources online about it. Could you make a video covering gradient checkpointing?

  • @ec92009y
    @ec92009y2 жыл бұрын

    I had a little trouble getting the CSV file in place. It would have been great to point to the file upload capability in Colab. Other then that, awesome! THX.

  • @jonathanharris5391
    @jonathanharris5391 Жыл бұрын

    If you added more dense layers would the model be able to predict better?

  • @SYEDHASSANASLAMBE-CSE
    @SYEDHASSANASLAMBE-CSE Жыл бұрын

    Sir i am gotting lot of error in tensorflow pkg importing where i got a complete tensorflow pkg or pre installed pkg of tensorflow and its depwndencies

  • @anziledge326
    @anziledge326 Жыл бұрын

    is there any rule like, to load the model, the model should be saved in same computer and with same version of tensorflow. I am asking this because, i downloaded a pretrained model from tensorflow zoo into my pc. Then I use this load function with model folder. its not working

  • @inquisitivelearner8649
    @inquisitivelearner86498 ай бұрын

    You are amazing!

  • @inquisitivelearner8649

    @inquisitivelearner8649

    8 ай бұрын

    Compile - When computer turns code into machine language (the language understood by the computer)

  • @54n801
    @54n801 Жыл бұрын

    can u tell me why we are using X and Y variable , and what does the get_dummies func do .

  • @blackamericanlesbianprofes4357
    @blackamericanlesbianprofes4357 Жыл бұрын

    Thank you for sharing. Your video has helped me learn a little more about TensorFlow with Python. 13may23

  • @reihanehmirjalili7467
    @reihanehmirjalili74672 жыл бұрын

    Thanks for this video Mick. I just think it would be better and more understandable for beginners if you go more into details and explain them more

  • @NicholasRenotte

    @NicholasRenotte

    2 жыл бұрын

    Doing new vids on that as we speak!!

  • @harishiva_rg
    @harishiva_rg4 ай бұрын

    Why 32 and 64 units in the dense layers? How to know the no. of neurons to have in my NN layers?

  • @heyricksander
    @heyricksander4 ай бұрын

    Please help. I ran the tutorial in google colab, got the model out to drive, then back into the colab notebook. I dont understand what i am supposed to do with the model once it's ready. This tutorial doesnt like, open it up and look at what it learned. Can someone please offer guidance?

  • @21EC
    @21EC3 ай бұрын

    Does it enable to train any kind of task required to achieve? can it learn from it for example how to do videos correctly? (Im a complete total noob in AI so I have no idea)

  • @hunsnowboarder02
    @hunsnowboarder023 жыл бұрын

    I love your videos! I have a small problem with this one though. This is rather keras and not tensorflow. With plain tensorflow you need lots more coding (which of course comes with greater flexibility)

  • @NicholasRenotte

    @NicholasRenotte

    3 жыл бұрын

    Heya, ultimately using Keras with a Tensorflow backend. You still have a lot of flexibility running using the Sequential API, I'd agree though, there is a lot more flexibility using direct tensorflow layers. In my opionion however unless you're creating complex models or performing research it seems like overkill for most use cases.

  • @TigerFitoff
    @TigerFitoff2 ай бұрын

    good video. just wish you would've done the MNIST dataset

  • @JoydurnYup
    @JoydurnYup2 жыл бұрын

    great :)

  • @user-qj2zj3gu1f
    @user-qj2zj3gu1f7 ай бұрын

    How to fix AttributeError: module 'numpy' has no attribute 'object' while importing tensorflow?

  • @astronaut205
    @astronaut2053 жыл бұрын

    Great video.. Only thing that troubled me was the data selection using pandas but I will find out

  • @NicholasRenotte

    @NicholasRenotte

    3 жыл бұрын

    Awesome! Want to share? Happy to help out!

  • @jinanlife
    @jinanlife2 жыл бұрын

    OK. you have the biggest eyes on the planet. YOU WIN!

  • @quintoncarroll4828
    @quintoncarroll48282 ай бұрын

    Can you use ordinal data in a predictive model?

  • @edwardseverinsen5598
    @edwardseverinsen5598 Жыл бұрын

    0:23 _NICHOLAS RENOTTE - WORRIED ABOUT THE TIME LIMIT_ *Talking fast* LOL, that made me laugh really hard. I also enjoyed the video.

  • @juanmanueldiazortiz7054
    @juanmanueldiazortiz70542 жыл бұрын

    Hi Nick, can you comment which is the business case with this model? What do we want to predict? In which escenario can do we use this model? We got the model and the accuracy_score but then how can we use it? Quite new to Data Science. Thanks.

  • @NicholasRenotte

    @NicholasRenotte

    2 жыл бұрын

    Heya Juan, so churn prediction is a really popular ML task in businesses because it's to do with predicting customers that might leave our company. This is important to get on top of (and ideally try to keep the customer) because it costs a lot more to attract a new customer than to keep an old one!

  • @Andy-rq6rq
    @Andy-rq6rq3 жыл бұрын

    😂loved the intro

  • @NicholasRenotte

    @NicholasRenotte

    3 жыл бұрын

    🤣 not gonna lie, that was me when I first started learning it!

  • @randomcomputer7248
    @randomcomputer72482 ай бұрын

    What is the output of this ? Having a number like 0.8 is of no use when I want to see how many have churned. You could just have put a filter on the Excel sheet on the Churn column !

  • @mazenal-emad8680
    @mazenal-emad86806 ай бұрын

    bro "-" u r the best

Келесі