How Many Hidden Layers and Neurons does a Neural Network Need

Поділитися
Вставка
  • Опубліковано 17 жов 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
  • Наука та технологія

КОМЕНТАРІ • 26

  • @Kornackifs
    @Kornackifs 8 місяців тому +10

    video starts at 2:38

  • @CannurKartum
    @CannurKartum 11 місяців тому +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 Рік тому +4

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

  • @someoneiselse
    @someoneiselse 9 місяців тому

    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?

  • @ChaseWillden-ef6ve
    @ChaseWillden-ef6ve Рік тому +2

    Hey this was super helpful, thank you!

    • @misraturp
      @misraturp  Рік тому

      Glad to hear that, you're welcome!

  • @vovin8132
    @vovin8132 3 місяці тому +1

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

  • @sibbo18
    @sibbo18 Рік тому

    Thank you very much :)

  • @ausamabander9942
    @ausamabander9942 10 місяців тому

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

    • @agenticmark
      @agenticmark 4 місяці тому +2

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

  • @agenticmark
    @agenticmark 4 місяці тому +1

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

  • @noecouvat9625
    @noecouvat9625 22 дні тому

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

  • @VadimChes
    @VadimChes 3 місяці тому

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

  • @uchiha_sasuke_48
    @uchiha_sasuke_48 6 місяців тому

    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 4 місяці тому +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!

  • @2silkworm
    @2silkworm 13 днів тому

    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.

  • @Thiesi
    @Thiesi Рік тому

    Thanks for another great video and groetjes from Germany!

    • @misraturp
      @misraturp  Рік тому

      You're very welcome Thiesi!

  • @tinanajafpour7214
    @tinanajafpour7214 Рік тому

    nice tutorial

  • @Central-station
    @Central-station 5 місяців тому

    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 4 місяці тому

      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 Рік тому

    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 4 місяці тому

      lamest comment ever.
      good luck with your engineering career.