How Many Hidden Layers and Neurons does a Neural Network Need

Sdílet
Vložit
  • čas přidán 17. 10. 2022
  • Neural Networks have a lot of knobs and buttons you have to set correctly to get the best possible performance out of it. Although some of them are self-explanatory and easy to understand (like the number of neurons in the input layer) and choose, there are many hyperparameters that are a bit more complex in terms of how they affect the outcome of the model (e.g. number of layers, the batch size or weight initialization).
    In this lesson, we will look into the number of neurons in the input, output, and hidden layers and the number of hidden layers. We will learn the rules and best practices for determining the number of hidden layers and the number of neurons in there.
    Previous lesson: • All Hyperparameters of...
    Next lesson: • Which Loss Function, O...
    📙 Here is a lesson notes booklet that summarizes everything you learn in this course in diagrams and visualizations. You can get it here 👉 misraturp.gumroad.com/l/fdl
    📕 NNs hyperparameters cheat sheet: www.soyouwanttobeadatascienti...
    👩‍💻 You can get access to all the code I develop in this course here: github.com/misraturp/Deep-lea...
    ❓To get the most out of the course, don't forget to answer the end of module questions:
    fishy-dessert-4fc.notion.site...
    👉 You can find the answers here:
    fishy-dessert-4fc.notion.site...
    RESOURCES:
    🏃‍♀️ Data Science Kick-starter mini-course: misraturp.gumroad.com/l/kick-...
    🐼 Pandas cheat sheet: misraturp.gumroad.com/l/pandascs
    📥 Streamlit template (updated in 2023, now for $5): misraturp.gumroad.com/l/stemp
    📝 NNs hyperparameters cheat sheet: www.misraturp.com/nn-hyperpar...
    📙 Fundamentals of Deep Learning in 25 pages: misraturp.gumroad.com/l/fdl
    COURSES:
    👩‍💻 Hands-on Data Science: Complete your first portfolio project: www.misraturp.com/hods
    🌎 Website - misraturp.com/
    🐥 Twitter - / misraturp
  • Věda a technologie

Komentáře • 27

  • @Kornackifs
    @Kornackifs Před 10 měsíci +13

    video starts at 2:38

  • @CannurKartum
    @CannurKartum Před rokem +2

    Thank you for making it much clear, I was looking for this answer for a 10min and finally found it wıith very good explanation!

  • @modernTech583
    @modernTech583 Před rokem +4

    Thank you so much for taking time off your schedules to teach us

  • @someoneiselse
    @someoneiselse Před 11 měsíci

    Great video! Just wondering with inputs and the example of the table that has 4 columns, the first column is just the ordering number, what value does that add?

  • @vitorribeirosa
    @vitorribeirosa Před 16 dny

    THanks for sharing this video.

  • @ChaseWillden-ef6ve
    @ChaseWillden-ef6ve Před rokem +2

    Hey this was super helpful, thank you!

    • @misraturp
      @misraturp  Před rokem

      Glad to hear that, you're welcome!

  • @sibbo18
    @sibbo18 Před rokem

    Thank you very much :)

  • @ausamabander9942
    @ausamabander9942 Před rokem

    thank you , you just help me with the hidden layers number

    • @agenticmark
      @agenticmark Před 5 měsíci +2

      you can grid search it to see where the sweet spot (least amount of layers that learns at your desired rate)

  • @vovin8132
    @vovin8132 Před 5 měsíci +1

    "It's better to be deeper than wider" -- Sun Tzu

  • @Thiesi
    @Thiesi Před rokem

    Thanks for another great video and groetjes from Germany!

  • @tinanajafpour7214
    @tinanajafpour7214 Před rokem

    nice tutorial

  • @noecouvat9625
    @noecouvat9625 Před 2 měsíci

    So is a hidden layer anything that is between the input and the output layers?

  • @uchiha_sasuke_48
    @uchiha_sasuke_48 Před 7 měsíci

    What if I'm using Audio dataset?
    In this case, I'm extracting features from the audio using MFCC's. So how many neurons, layers should I need to decide?

    • @agenticmark
      @agenticmark Před 5 měsíci +1

      it would depend on the depth encoding of the audio and how many features you are encoding. I would look at tortoise and fast tts to see what they are doing if your problem is similar.
      i got lost in this sort of thing for months, good luck!

  • @VadimChes
    @VadimChes Před 4 měsíci

    Why should I use two hundred neurons if I have only 4 input neurons for example? I'd like to know how to decide on the number. What I know for now is you should start with hidden layer as 1.5 to 3 times of number of input neurons...

  • @agenticmark
    @agenticmark Před 5 měsíci +1

    i need to write a model that does voice-to-voice and cuts out all the weird left-coast mouth-smacking....

  • @Central-station
    @Central-station Před 6 měsíci

    Excuse me, I don't know, but this is not the way I'm understanding the concept of layers in neuro networking. For me, it was like the number of layers, depends on the complexity of how the blue line could adjust itself to match the orange curve (I know you know what I am talking about).
    Is it the same thing that you are saying or maybe I got it wrong?

    • @agenticmark
      @agenticmark Před 5 měsíci

      sort of, but its not a 1 to 1 mapping. knowing how many "data points" you are mapping, or how many features you are comparing the prediction vs the actual (loss) gives you a starting point of how many neurons in a layer, but it doesnt tell you a lot about how many layers in depth or what kind of layers (or activation fns)
      my advise is grid search to find out what works for your model and hardware. write your initial models with the ability to pass in "meta" information describing what the HLs will look like. search and document results. use 3 values at a time, small, medium, large - then you can search between ranges that show promise

  • @whizzingbye
    @whizzingbye Před rokem

    Honesty data for yourself. I came here for neural car ai app to understand layers and neurons. Subbed before watching cuz easy on the eyes and ur english so amazing. Easy on the eyes enough to think your English lol

    • @agenticmark
      @agenticmark Před 5 měsíci

      lamest comment ever.
      good luck with your engineering career.

  • @2silkworm
    @2silkworm Před měsícem

    nowadays you have to reserve at least 72 extra neurons in your output layer when you classify genders, otherwise you are risking to get cancelled. And the list will surely grow in the future.