Sequential Model - Keras

Поделиться
HTML-код
  • Опубликовано: 4 окт 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...
  • КиноКино

Комментарии • 66

  • @jimscott1392
    @jimscott1392 5 лет назад +5

    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.

  • @carmenfieruta4578
    @carmenfieruta4578 4 года назад +2

    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!

  • @trinetrareddy6735
    @trinetrareddy6735 5 лет назад +9

    I was so much confused before, but these things made a lot of sense to me..Thanks a lot for providing the base to start Keras

  • @theodoretourneux5662
    @theodoretourneux5662 2 года назад +3

    amazing! concise, clear and exactly what I was looking for! I wish this was the first video I had watched

  • @IWNL-KenWuKong
    @IWNL-KenWuKong 5 лет назад +1

    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.

  • @b.f.skinner4383
    @b.f.skinner4383 4 года назад +4

    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 :)

  • @amirsadafi3030
    @amirsadafi3030 3 года назад +2

    This was really outstanding video, Thank you very much.

  • @abeyassefa2775
    @abeyassefa2775 6 лет назад +1

    Elegant, precise and concise. Thank you, sir!

  • @louie-5749
    @louie-5749 5 лет назад +1

    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.

  • @huannguyentrong1249
    @huannguyentrong1249 3 года назад

    Nice video, Thank you !

  • @gomorrahproductions1020
    @gomorrahproductions1020 3 года назад

    "ogres onions and deep learning". ahahah i love it man you make this very enjoyable. keep it up

  • @pkl520
    @pkl520 7 лет назад +2

    big thanks to bring us such great tutorial~!

  • @shinidied107
    @shinidied107 4 года назад

    This video is very helpful! Thank you!

  • @krishnasashank6116
    @krishnasashank6116 4 года назад

    Great Video! Helped a lot!
    Thanks Pal!

  • @pythonnumpytutorials9955
    @pythonnumpytutorials9955 3 года назад

    Mate , its amazing

  • @deferler
    @deferler 6 лет назад

    definitely one of the best tutorial i found on keras

  • @zahidadeel25
    @zahidadeel25 6 лет назад

    very nice notebooks and very good explanation. Thanks.

  • @IntegralDeLinha
    @IntegralDeLinha 2 года назад

    Thanks!! That was useful!

  • @imzwaza6784
    @imzwaza6784 5 месяцев назад

    thank you sir

  • @pgf2940
    @pgf2940 4 года назад +1

    i just want to ask how do you determine how many neurons and input shape you should put

  • @FezanRafique
    @FezanRafique 5 лет назад

    Great tutorial, thanks :)

  • @constanceunderberg910
    @constanceunderberg910 2 года назад

    Hey, can you help me with troubles I have regarding tensorflow?

  • @jrgantunes
    @jrgantunes 5 лет назад

    Thank you, you are the best

  • @prashantpal1248
    @prashantpal1248 2 года назад

    for predictions model.predict_classes is a depreciated function. can someone please tell me what to use instead of it???

  • @plortopod9908
    @plortopod9908 3 года назад

    Oh this is that guy from the Minecraft Monday Show

  • @mtg7848
    @mtg7848 2 года назад

    hello, is there a link where these codes are written and the explanations are written?

    • @DataTalks
      @DataTalks  2 года назад

      Totally! All of the code is here: github.com/knathanieltucker/a-bit-of-deep-learning-and-keras/tree/master/notebooks

  • @petergiangrasso5519
    @petergiangrasso5519 3 года назад

    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

  • @Pippa1351
    @Pippa1351 3 года назад

    How do you know what dense dimensionality you want?

    • @DataTalks
      @DataTalks  3 года назад

      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

  • @isleguard
    @isleguard 6 лет назад

    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

    • @DataTalks
      @DataTalks  6 лет назад

      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 :)

  • @IWNL-KenWuKong
    @IWNL-KenWuKong 5 лет назад

    Could you also show how to do one hot encoding?
    Im getting some errors when passing in multidimensional arrays into the fit function.

    • @DataTalks
      @DataTalks  5 лет назад

      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!

  • @Rohit-nb8nf
    @Rohit-nb8nf 5 лет назад

    Instead of dummy data ,why don't you show with some dataset like reuters data with LSTM or RNN ,,,?

    • @GeneralTerzX
      @GeneralTerzX 5 лет назад

      bc this was taken directly from keras.io and he just went their guide

  • @surinamelephant786
    @surinamelephant786 7 лет назад

    incredibly usefull ...

  • @anjorobles7504
    @anjorobles7504 2 года назад

    is sequential model is a pre trained model?

    • @DataTalks
      @DataTalks  2 года назад

      Not necessarily! Sequential is just a way to construct models with keras. They can be pretrained but not necessarily!

    • @anjorobles7504
      @anjorobles7504 2 года назад

      @@DataTalks thankyou for the clarification

  • @ImranKhan-fi2sm
    @ImranKhan-fi2sm 4 года назад

    Can you please explain Conv1D for sequence prediction problem specially time series prediction.

    • @DataTalks
      @DataTalks  4 года назад

      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

  • @sagarvyavahare2558
    @sagarvyavahare2558 4 года назад

    Can we use sequential models in keras for offline cursive handwritten recognition system

    • @DataTalks
      @DataTalks  4 года назад

      You can! You'll probably use an RNN which is a specific layer in keras

  • @robosergTV
    @robosergTV 6 лет назад

    reason you are not using the adam optimizer?

    • @DataTalks
      @DataTalks  6 лет назад +1

      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

    • @robosergTV
      @robosergTV 6 лет назад

      thanks!

  • @rizkikaramadhani9721
    @rizkikaramadhani9721 4 года назад

    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!

    • @DataTalks
      @DataTalks  4 года назад

      These days you'll want to be using tensorflow directly - so install tensorflow and use tf.keras.layers! Hope that helps!

    • @rizkikaramadhani9721
      @rizkikaramadhani9721 4 года назад

      thankyou!

  • @billynye9436
    @billynye9436 2 года назад

    based and sigma pilled

  • @NattapongPUN
    @NattapongPUN 7 лет назад +1

    Thanks, How to deploy on cloud platform?

    • @DataTalks
      @DataTalks  7 лет назад

      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).

  • @stackexchange7353
    @stackexchange7353 4 года назад

    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.

    • @DataTalks
      @DataTalks  4 года назад

      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)

  • @nickbulitka3213
    @nickbulitka3213 5 лет назад

    Hi I like videos (keep it up). Just wondering if any of your code is available (say on github)?

    • @DataTalks
      @DataTalks  5 лет назад

      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!

  • @shristiadhikari
    @shristiadhikari 2 года назад

    I'm watching at 66,666 views, scary!

  • @shawnveltman1482
    @shawnveltman1482 6 лет назад

    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?

    • @DataTalks
      @DataTalks  6 лет назад

      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!

    • @PatrickBateman12420
      @PatrickBateman12420 6 лет назад

      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.

    • @DataTalks
      @DataTalks  6 лет назад +1

      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.

  • @zubairuddinkhan5075
    @zubairuddinkhan5075 4 года назад

    so low voice ... dislike