Introduction to Neural Networks in Python (what you need to know) | Tensorflow/Keras

preview_player
Показать описание
Learn data skills with hands-on exercises & tutorials at Datacamp!

In this video we start by walking through some of the basics. We look at why we use neural networks and how they function. We do an overview of network architecture (input layer, hidden layers, output layer). We talk a bit about how you choose how many hidden layers and neurons to have. We also look at hyperparameters like batch size, learning rate, optimizers (adam), activation functions (relu, sigmoid, softmax), and dropout. We finish the first section of the video talking a little about the differences between keras, tensorflow, & pytorch.

Next, we jump into some coding examples to classify data with neural nets. In this section we load in data, do some processing, build our network, fit our data to it, and then finally evaluate our model. The examples get more complex as we go along. Some setup instructions for the coding portion of the video are found below.

I’m going to post a follow up video to this soon where we walk through a real world example where we automatically classify images of hands for the game of rock, paper, scissors. Hopefully that should be up about 2 weeks from now. (EDIT: part 2 has been posted, link below)

If you enjoyed this video, make sure to like & subscribe. Feel free to leave any questions in the comments section.

Part 2!

––––––––––––––––––––––––––––––
Creative Commons — Attribution 3.0 Unported — CC BY 3.0
––––––––––––––––––––––––––––––

Video timeline!
0:00 Video overview
1:34 Why use neural networks
3:08 How neural nets work (architecture basics)
6:11 Hyperparameter overview (batch size, optimizer, dropout, learning rate, epochs)
7:53 How do we choose layers, neurons, & other parameters?
9:08 Why do we need an activation function?
10:20 What activation function should I use?
11:25 Keras vs Tensorflow vs PyTorch
12:30 Coding starts (github & setup)
14:07 Writing our first neural network (linear example)
27:31 Shuffle order of training data
32:00 Example #2: Classifying quadratic data
36:06 Example #3: Classifying 6 clusters of data (try on your own)
43:27 Example #4: Classifying multiple labels at a time (BinaryCrossentropy loss)
55:19 Example #5: Classifying our complex data from start of video
59:00 Conclusion & Next steps of learning neural nets

---------------------
Follow me on social media!

Practice your Python Pandas data science skills with problems on StrataScratch!

Рекомендации по теме
Комментарии
Автор

Hey everyone! Quick update, looks like the code for example #4 (clusters_two_categories) has been causing some people issues. Running the code that I demo in the video is resulting in low accuracy scores. I'm guessing something changed with one of the libraries used behind the scenes.

I challenge you to try to rewrite this network from scratch and see if you are able to classify the data properly. If you are able to do this, please let me know what you changed! I want to share with everyone who is running into this problem. I'm happy to give you a shoutout if you find a solution :).

A few suggestions that might help as you try to rewrite the network... You'll see some immediate performance boosts if you normalize the data between 0 and 1 instead of the range it currently is in. I also recommend playing around with the hyperparameters to the network (number of layers, neurons per layer, learning rate, loss function, optimizer, etc.). Maybe try using different methods to vectorize the data. Let me know if you are able to find a solution!

KeithGalli
Автор

An hour of free online teaching from the best there is. I'm not sure people know how lucky they are.

jonpounds
Автор

Video timeline!
1:34 - Why use neural networks
3:08 - How neural nets work (architecture basics)
6:11 - Hyperparameter overview (batch size, optimizer, dropout, learning rate, epochs)
7:53 - How do we choose layers, neurons, & other parameters?
9:08 - Why do we need an activation function?
10:20 - What activation function should I use?
11:25 - Keras vs Tensorflow vs PyTorch
12:30 - Coding starts (github & setup)
14:07 - Writing our first neural network (linear example)
18:45 - Selecting optimizer & loss function (model.compile)
23:45 - Fitting training data to our model (model.fit)
27:31 - Shuffle order of training data
30:12 - Evaluate model on test data (model.evaluate)
32:00 - Example #2: Classifying quadratic data
36:06 - Example #3: Classifying 6 clusters of data (try on your own)
41:03 - Using network to predict a single data point (model.predict)
43:27 - Example #4: Classifying multiple labels at a time (BinaryCrossentropy loss)
55:19 - Example #5: Classifying our complex data from start of video
59:00 - Conclusion & Next steps of learning neural nets

Thank you for watching! If you enjoyed, remember to throw this video a like & consider subscribing if you haven’t already :).

KeithGalli
Автор

youre not like the other tutorial bois. you explain like youre talking to a person and not a robot in taking info and the amount of useful info that makes you understand perfectly is extremely balanced and i just love you and please keep posting. you dont know how many people you help, and the help is freakin amazing too. love u

mohammedalzamil
Автор

At 38:30, instead of creating a dictionary and applying a lambda function, the easier way would be

train_df['color'] =
test_df['color'] =


And awesome tutorial! Out of all tutorials on Youtube, your tutorials are the easiest to follow and I always follow from start to finish.

kccchiu
Автор

Thanks, Keith, everything I learn from your tutorials always sticks...looking forward to the follow-up video,

iamwangwe
Автор

The lambda function color map, just elegant, clear, and beautiful. Great work, thanks.

bryanchambers
Автор

A pure knowledge hour delivered in such lucid a manner that makes one feel comfortable and know that even if they mess up things, it can still be ok.
No Data Science taboos when Keith is here.

GhizlaneBOUSKRI
Автор

I feel lucky to finde such a good vedio free on youtube. Thanks alot Keith!

MrKhaledpage
Автор

Love your videos. I'm a high school student and I really like your vids compared to other resources I've used so far.

tech
Автор

I really appreciate how easy you follow you make this lesson, thanks dude!

carrocesta
Автор

this man will literally be the reason I get employed

dana
Автор

Understanding the tf documentation can be overwhelming when first trying to learn the library but this was really helpful and explained clearly, thank you

b.f.skinner
Автор

I found my current job because of your vids. Thanks man

asfasdfsd
Автор

Yes! Finally another video. I was waiting for ages

thebeston
Автор

Keith, I did Python Course from Coursera and was looking for practicing in Data Science and Machine Learning. Luckily i found your channel and have already gone through videos of Pandas, Numpy and Sales analysis videos related to data science. Feels Super motivated after that as i learned so many things. Kindly upload more real world projects, with deeper analysis required. Love your skills, it is helping me and polishing my skills, developing my Github profile :D Now jumping to ML and AI related topics as I want to switch my career to DS and ML, so to be successful in that learning ML models are key. Also, following Andrew Ng. Can you refer me good books or resources where you learnt from. I would be glad.. Best Online Teaching Channel Ever.

aishapervaiz
Автор

Sir you are awesome thanks a lot sir please please continue this deep learning with keras and tensorflow

Nirajbasyal
Автор

Damn good! Thanks for this! Please cover more complex NNs with examples. Like RNNs CNNs GANs

reubenrapose
Автор

clusters with two categories are stuck at 0.3~0.4 accuracy even when using binary cross entropy

EOh-ewqf
Автор

Can you please continue on deep learning and neutral networks tutorials

akshatkhare