14- SOLVING OVERFITTING in neural networks

Поделиться
HTML-код
  • Опубликовано: 21 авг 2024

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

  • @akashkris
    @akashkris Год назад +3

    Finally!!! The Kind of explanation i was expecting for past couple of years from experts.
    ThankYou Valerio for this Deep Learning series.

  • @Mohammad-fv1zb
    @Mohammad-fv1zb 2 года назад +3

    Awesome Series, The best course on neural networks, I learned here more than university. Efficient, practical, excellent...

  • @leowei2575
    @leowei2575 3 месяца назад

    I have chosen to build a Music Genre Classifier for a Deep Learning Project and its very nice to get strated watching your playlist. I watched now several videos from this playlist and it's super helpful and straight forward. Thanks!

  • @oroneki
    @oroneki 4 года назад +6

    a video on audio data augmentation would be great!!!

  • @satishbanka
    @satishbanka 4 года назад +3

    One of the best videos, I have ever seen on solving overfitiing issues with neural networks... Learning a lot from you...

  • @i_am-ki_m
    @i_am-ki_m 2 года назад

    Overfitting knowledgments in my genre classifier/AI Music!

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

    Thanks a lot. Your explanation of everything is totally outstanding.

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

    Super great content! I love your chill approach to solve these problems and to teach!

  • @mynickisjal
    @mynickisjal Год назад +2

    Hi Valerio, great series, one question, how did you choose the *learning_rate* value (0,0001)? is this an empirical standard or is it related to the size of the dataset or..? Thank you or your time

  • @ashurasadullah3398
    @ashurasadullah3398 2 года назад +1

    hello Valerio, thanks so much for the great and easy way to an explanation. I am trying to implement dropout and regularization methods for my project, however, results don't change at all, still cannot understand what is the problem and why it does not work for my project. The model is quite similar to your model which is what you explained...

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

    Just a note: when encountering a loss function like in 15:10, early stopping would not help. If you'd apply it the shown way, you'd basically just saying "This Ain't It, Chief" to the network only after it started. Early stopping can be applied if the generalization error of the network increases again after the network already learnt some things (and then gets worse again). I would argue that your acc/loss curves indicate that the used network is not really able to learn anything and therefore you should go for other regularization methods, that actually allow the network to learn from the given data.

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

      That's a good point - thank you for the feedback. The error plot I showed isn't the best example for showing when to use early stopping. I hope the message was conveyed nonetheless :)

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

    You are doing a great job!

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

    thank you so much it has been a helpful series for me keep uploading thank you :)

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

    Too good mate

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

    A video on Time series augmentation would be awesome

  • @mikeguitar-michelerossi8195
    @mikeguitar-michelerossi8195 4 года назад

    Great explanation, thank you so much! I'd like to ask you, does the L1 and L2 regularization consider only the weights of the neurons or also the biases ,if any, as penalty? (I'm referring to the term |Wi|)

  • @eranfeit
    @eranfeit Год назад

    Hi,
    Thanks. I have a question .
    I saw your explain for the Dropout for Dense layer (fully connected)
    As for Convolutional neural networks, Should we add Dropout for the Convolutional layers as well ? or just for the Dense layers ?
    Eran

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

    I actually like your videos :D

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

    Excellent course
    15/11/2020

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

    One doubt I had is in data augmentation you said more data the better. Well I'm doing this as my graduation project. I used a 22gb dataset but I got an accuracy of 40% . So I'm going to use your dataset and do the project. Thank you for the videos.
    I plan on deploying the model , where do I refer to learn that?

    • @ValerioVelardoTheSoundofAI
      @ValerioVelardoTheSoundofAI  4 года назад +3

      Yep, the general rule is the more data the better. However, the quality of the data is also important. By that, I mean that the tracks in the same genre category should be quite similar, and, at the same time, different categories should sound substantially different. If that's not the case, the algorithm will have a difficult time learning patterns in the data. Also, in this video, we're using a simple multi-layer perceptron, which isn't particularly effective for this task. In the next couple of videos, we'll learn about convolutional neural nets, which tend to perform better on genre classification. By using a CNN, you should be able to improve the accuracy on your dataset. Finally, it's worth mentioning that music genre classification isn't a well-defined problem. Even human evaluators sometimes disagree when bucketing songs into different genres. All this to say that music genre classification has a ceiling, and you can't expect 95% accuracy ;)
      As for your question, you can deploy a TensorFlow model as a Flask API. The process is a bit tricky. In a month or two, I intend to release a mini-series on how to do deploy an audio-based AI model with Docker, Flask and AWS. If you can't wait until then, I'm afraid you'll have to do a bit of search on the Internet. Unfortunately, I'm not aware of any solid reference on the subject.
      I hope this helps :)

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

      @@ValerioVelardoTheSoundofAI Thank you for the guidance! looking forward to your future videos.

  • @Waffano
    @Waffano Год назад

    It seems like the val accuracy hasn't changed much (still around 60%)? Shouldnt we be getting better accuracy if we have less overfitting?

  • @lakshaysharma1888
    @lakshaysharma1888 Год назад

    wow thanks

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

    Hi Valerio, thank you so much for your detailed tutorials. I have greatly benefitted. My query is , isn't the validation accuracy too low compared to test accuracy? In image classification the validation accuracy is mostly over 90%. Is the validation accuracy in sound analysis considered 'good' if I get 60% v?

    • @ValerioVelardoTheSoundofAI
      @ValerioVelardoTheSoundofAI  3 года назад +1

      That really depends on the problem. All things considered, where you're dealing with subjective tasks (e.g., recognizing genres) the validation accuracy will generally be lower.

  • @user-cs8pt4zf8u
    @user-cs8pt4zf8u 5 месяцев назад

    liked and subscribed w vid bro

  • @giostechnologygiovannyv.ri489
    @giostechnologygiovannyv.ri489 Год назад

    22:00 I thought he would say another thing than "use L2 if is complex" xD that was so obvious to see come as he said before use L1 for simple data and L2 and complex data xD

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

    sir i really like your tutorial ,It help me a lot but i have an issue,Sir i have doubt regarding the accuracy .
    Sir as according to your graph we have solved overfitting problem but if you will look for accuracy for training set ,now it has been decreased to 70 % even if here you are using 100 epochs but in previous one with 50 epochs we got accuracy for training to 97 % .So to overcome with overfitting we have decreased our accuracy so .
    Will it not affect our model?
    Any other solution regarding this?

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

      It's possible that we may need more epochs and/or a more complex model (i.e., more layers / neurons) to increase accuracy in the training set.

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

      @@ValerioVelardoTheSoundofAI but sir my doubt is that in second case even we have 100 epochs but still we are getting 70% accuracy for our training set according to your code but in previous code we got 97% with 50 epochs ?

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

      @@coding_kit in the initial run, the model was clearly overfitting the data. That's an issue we must avoid for the sake of generalising our system to unseen data.

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

      @@ValerioVelardoTheSoundofAI i got it sir ,thank you

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

    Полезное видео, только один момент не понравился - после дропаута и регуляризации нельзя сказать, что модель стала классифицировать лучше, по сравнению с прошлым результатом. Для тестового набора показатели примерно те же самые. Она просто на тренировочном наборе стала хуже результаты выдавать. и соответственно разница в результатах на тестовом и тренировочном наборе стала гораздо меньше

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

    Great tutorial! I just have one quick question, is there a way to make my model converge? Seems like every time I run it, it shows a different value. Thank you!

    • @user-vg4gw1qj7m
      @user-vg4gw1qj7m 3 года назад +1

      Showing different value is normal, because the training process is non-deterministic.
      If you want to use the model, then you don't have to train it each time, but train it once, and the retrieve use it to predict.

  • @farahamirah2091
    @farahamirah2091 Год назад

    Hi, i already saved the model and want to continue training the overfitting model, how to continue adding regularization to the saved model?

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

    I have a question, the dataset files are of variable length. Can you suggest any thing which may help. your work is so great. Thank you

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

    How about derivatives mfcc order one and order 2? Would that help? more datapoints not necessarily new data or "augmented data"

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

    Can you make video on "Audio Data Augmentation", in case if you have already made it , can you share the link?

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

      I'm planning to have a mini-series on audio data augmentation in the next months. Stay tuned!

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

      @@ValerioVelardoTheSoundofAI ok Thank you.

  • @Abhishek-kw9sp
    @Abhishek-kw9sp 4 года назад

    Thank you so much for this amazing series!!
    Although I'm having trouble with this one thing that my model is showing a sudden drop in accuracy at 74th epoch resulting in overall poor accuracy. Any suggestions what should I do to fix this problem ?

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

      Not sure what's happening there. Have you tried re-running the training? Also, does the drop in accuracy concern the training set or the validation set?

    • @Abhishek-kw9sp
      @Abhishek-kw9sp 4 года назад

      @@ValerioVelardoTheSoundofAI Yes, I have tried running it multiple times, but it has always shown a drop around the 70th epoch. I've also tried increasing the #epochs to 150 but despite that it reaches to 60-62% max at 120th epoch and becomes almost constant after that.

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

    Is this classifier only a genre classifier or does it depend on the data sets you train with?

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

      It depends on the data. The classifier doesn't know anything about music until is trained ;)

  • @saisandeep1843
    @saisandeep1843 Год назад

    I am still getting loss of 2.4 for val_loss. whereas my train_loss is 0.26, Someone kindly help

  • @Rishi-nv7bp
    @Rishi-nv7bp 4 года назад +1

    im getting accuracy: 0.6519 val_accuracy: 0.5519
    isnt that v less?

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

    So what code should i write ahead of this to get the genre of a random music file which is not part of this data set ?

    • @user-vg4gw1qj7m
      @user-vg4gw1qj7m 3 года назад

      You can find similar code in the speech regocnition series, particularly in the keyword_spotting_service file.

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

    Can you help me regarding model.predict() for this model?
    I am getting this when I try to predict using a test wav file for the model.h5 file.
    AttributeError: 'str' object has no attribute 'shape'.
    Can you help please , Thank You.

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

      It's difficult to say what the issue may be. From what I gather, you're passing a string instead of an array somewhere. Strings don't have 'shape' - arrays do. Have you checked that you're passing a Numpy array/list of arrays, or TensorFlow tensor/list of tensors as an argument to model.predict()?

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

      @@ValerioVelardoTheSoundofAI yes I did pass it as an np array

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

      @@ValerioVelardoTheSoundofAI but for this model the input will be the .wav file right or we will first have to convert it to json before passing the predict method? I gave .wav file as input for the predict method.

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

      @@painfgaming8229 nope - you should pre-process the wav file, extracting the MFCCs as I've done in a previous video. When you use a model for inference (i.e., prediction), you should pass data of the same type as taht you've used for training. The intermediate passage of storing the MFCC as a Json file isn't really needed. The step by step process is: 1- load the wav file with Librosa, 2- use Librosa to extract the MFCCs with the same parameters used for training, 3- feed the extracted MFCCs to model.predict(). I hope this helps!

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

      @@ValerioVelardoTheSoundofAI thank you fot responding I'll try this

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

    what should i write to predict or test the datasets?

    • @user-vg4gw1qj7m
      @user-vg4gw1qj7m 3 года назад

      def predict(model, X, y):

      X = X[np.newaxis, ...]

      prediction = model.predict(X) # X -> (1, 130, 13, 1)

      predicted_index = np.argmax(prediction, axis=1) # [3]
      print("Excpected index: {}, Predicted index: {}".format(y, predicted_index))
      X = X_test[99]
      y = y_test[99]

      predict(model, X, y)

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

    Do some more projects please