Sequential Model - Keras
HTML-код
- Опубликовано: 2 дек 2024
- Here we go over the sequential model, the basic building block of doing anything that's related to Deep Learning in Keras. (this is super important to understand everything else that is coming after this in the series!)
I go over the two ways of declaring the functional signature (either way yields the exact same thing):
Way #1: Specifying a list of layers.
Way #2: Using the add method.
I then explain the segments of model compilation followed by model training after which I finally move onto model evaluation.
Links:
1) Link to my Scikit Learn tutorial - A Bit of DataScience and Scikit Learn: • Intro to Scikit Learn
2) The Hitchhiker's Guide to Python - one of the best handbooks to the installation, configuration, and usage of Python that I have come across: docs.python-gui...
3) Link to Keras: keras.io
4) Link to TensorFlow: www.tensorflow...
5) GitHub link to a-bit-of-deep-learning-and-keras notebooks: github.com/kna...
I looked at your video a week ago and I think you give really good explanations. Today, I wanted to give another listen to your video and I could hardly find your channel again. I am so glad I found it in the end. You are cool. Congratulations!
This channel is perhaps the most approachable, best set of instruction on data science and deep learning for beginners that I have found. I can't express how grateful I am for your videos. Thank you.
amazing! concise, clear and exactly what I was looking for! I wish this was the first video I had watched
Thank you for going through these documents. Sometimes I don't get these things when reading through them myself and you do a great explanation of what each of methods do and require.
You're amazing! I've been struggling to learn Keras for ages and this has just made everything so palatable and simple to understand, thank you :)
Elegant, precise and concise. Thank you, sir!
This was really outstanding video, Thank you very much.
"ogres onions and deep learning". ahahah i love it man you make this very enjoyable. keep it up
i just want to ask how do you determine how many neurons and input shape you should put
You rock. But now "a liiiitle bit of deep learning and a whole lotta Keras" will always play in my head when I run ctrl+return on my jupyter notebook.
big thanks to bring us such great tutorial~!
Hey, can you help me with troubles I have regarding tensorflow?
Mate , its amazing
This video is very helpful! Thank you!
Great Video! Helped a lot!
Thanks Pal!
very nice notebooks and very good explanation. Thanks.
for predictions model.predict_classes is a depreciated function. can someone please tell me what to use instead of it???
definitely one of the best tutorial i found on keras
Thanks!! That was useful!
Nice video, Thank you !
Can we use sequential models in keras for offline cursive handwritten recognition system
You can! You'll probably use an RNN which is a specific layer in keras
hello, is there a link where these codes are written and the explanations are written?
Totally! All of the code is here: github.com/knathanieltucker/a-bit-of-deep-learning-and-keras/tree/master/notebooks
Could you also show how to do one hot encoding?
Im getting some errors when passing in multidimensional arrays into the fit function.
Absolutely! Feel free to check out my video here that goes through feature transformations
ruclips.net/video/AlpsLp6FC50/видео.html
Or comment some code/email me. I'd be happy to help!
Great tutorial, thanks :)
hi, i just installed the keras in my Jupiter but wen i tried to install the keras.layers, it won't work. does anybody know how to solve this? big thanks!
These days you'll want to be using tensorflow directly - so install tensorflow and use tf.keras.layers! Hope that helps!
thankyou!
reason you are not using the adam optimizer?
No real reason here. It will depend on your specific problem for which optimizer you choose. Leslie N. Smith has some good work showing when and where you'd use each
thanks!
Good Tutorials but having problems deciding which model to use for a state-machine: Sequential or Dense? The inputs are current and previous states as a vector (or not?) and an error description (1-4) for minor, major, critical and failed
Right. So the answer is both. You should be using a Sequential model certainly. The layers you should be using in the model can be Dense (or they could be a 1D Convolution). Your inputs will be the current and the previous state, and you will use a Softmax activation for output.
This will work for Sequences of the same length. If you want to use sequences of varying lengths, you will need to use an LSTM. Feel free to ask any clarifications if need be :)
Can you please explain Conv1D for sequence prediction problem specially time series prediction.
Definitely check out my next series Deep Learning Building Blocks for a deep dive in this particular topic. But if you are hankering for an example now, check out this blog article by deepmind:
deepmind.com/blog/article/wavenet-generative-model-raw-audio
How do you know what dense dimensionality you want?
I go over a little bit of that here: ruclips.net/video/dRc9rrqHvaU/видео.html&ab_channel=DataTalks.
Ultimately the answer is that it depends - but check the above video for other heuristics
Oh this is that guy from the Minecraft Monday Show
Do you happen to have a video on embedding? I'm working with the fake news challenge data set from fakenewschallenge.org. You have headline - article body pairs, which I can't for the life of me figure out how to feed them into tokenizer.fit_on_texts(). I've experimented using a data frame with two columns ['Headlines', 'articleBody'], but word_index returns 3268, which I can't tell if that's right.
I do! You can check out:
ruclips.net/video/51_mlYmcyJk/видео.html
or
ruclips.net/video/biQaPcoV8A4/видео.html
(the latter is a bit more theoretical while the former is more practical)
thank you sir
Thank you, you are the best
I was so confused about layers until you compared them to ogres and onions - Now I get it! hahah jk this is a great video thank you
Thanks, How to deploy on cloud platform?
Great question! I'll be doing an in person talk about doing just that (if you follow me on twitter, @knatetucker, I'll announce that there). Otherwise there is a 50% chance that I'll do a series on the Google Cloud Platform and how to train and host a keras model there (probably in 3 months).
Instead of dummy data ,why don't you show with some dataset like reuters data with LSTM or RNN ,,,?
bc this was taken directly from keras.io and he just went their guide
is sequential model is a pre trained model?
Not necessarily! Sequential is just a way to construct models with keras. They can be pretrained but not necessarily!
@@DataTalks thankyou for the clarification
Hi I like videos (keep it up). Just wondering if any of your code is available (say on github)?
Absolutely! Here is the link: github.com/knathanieltucker/a-bit-of-deep-learning-and-keras/tree/master/notebooks.
There are more link goodies in the description too!
based and sigma pilled
Thanks, fantastic video & series! Regarding the shuffle, you said you couldn't imagine a case where you wouldn't shuffle your values - but for NLP , or sequential data issues (ie predict stock price, predict next purchase for customer based on past purchases, etc), wouldn't you want to preserve the order?
Great point. So with data that is not sampled independently (like a sentence or time series data) we should be careful how we shuffle (or perhaps not shuffle at all). Many NLP tasks break there dataset up into sentences and treat each sentence as a sample (and in some datasets this does violate the IID assumption for your data). Or for time series applications people sometimes don't shuffle the data at all. But in other instances they will block the data together into groups (of maybe 10 data points) and then feed those into the model as samples. These should be shuffled.
So I guess I was a bit too hasty when saying you should shuffle all your datasets :). Great point!
Not really. In NLP, (e.g. Kaggle Toxic NLP competition) let's say you have 100,000 rows. The first 10,000 rows are labeled 1, the other 90,000 rows are labeled 0. Now you need to reshuffle the rows (not the text) for training.
Without doing so, you most likely mess up the train/test split.
I think Shawn was pointing out that you don't want to shuffle the sentences themselves, ie. intra-sample. But you would certainly want to shuffle the order of the sentences in some NLP applications.
incredibly usefull ...
I'm watching at 66,666 views, scary!
so low voice ... dislike