Answers.Body: <p>You are right!</p>
  <p>1- the number of hidden layers shouldn't be too high! Because of the gradient descent when the number of layers is too large, the gradient effect on the first layers become too small! This is why the Resnet model was introduced.</p>
  <p>2- the number of hidden layers shouldn't be too small to extracts good features. It's proved that in CNN networks the first layers extract very simple elements like lines and curves but last layers extracts more complex features.</p>
  <p>3- number of hidden units is a hyper-parameters and usually you should find it by testing or based on your background knowledge.</p>
  <p>But what can you do at all?
  As you can tests different parameters and compare their results there is some other options! One option is grid search you can check this tutorial <a href="https://towardsdatascience.com/grid-search-for-model-tuning-3319b259367e" rel="nofollow noreferrer">https://towardsdatascience.com/grid-search-for-model-tuning-3319b259367e</a></p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-09-19T21:27:24.750Z
Answers.LastActivityDate: 2020-09-19T21:27:24.750Z
Answers.UserDisplayName: kiarash_kiani
Body: <p>I am using a deep autoencoder for my problem. However, the way I choose the number of hidden layers and hidden units in a hidden layer is still based on my feeling.</p>
  <p>The size of the model that indicates the number of hidden layers and units should not be too much or too few for the model can capture useful features from the dataset.</p>
  <p>So, how do I choose the right size of the deep autoencoder model is enough to good?</p>
  
Tags: <deep-learning><autoencoders><hyperparameter-optimization><hidden-layers><hyper-parameters>
Title: How to determine the number of hidden layers and units of a deep auto-encoder?
UserDisplayName: Truong Hoang
ThreadText: # How to determine the number of hidden layers and units of a deep auto-encoder?
  
  (Asked by: username_0 on 2020-08-18)
  
  I am using a deep autoencoder for my problem. However, the way I choose the number of hidden layers and hidden units in a hidden layer is still based on my feeling.
  
  The size of the model that indicates the number of hidden layers and units should not be too much or too few for the model can capture useful features from the dataset.
  
  So, how do I choose the right size of the deep autoencoder model is enough to good?
  
  **Tags:** deep-learning, autoencoders, hyperparameter-optimization, hidden-layers, hyper-parameters
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2020-09-19. Score: 0 | Accepted answer
  
  You are right!
  
  1- the number of hidden layers shouldn't be too high! Because of the gradient descent when the number of layers is too large, the gradient effect on the first layers become too small! This is why the Resnet model was introduced.
  
  2- the number of hidden layers shouldn't be too small to extracts good features. It's proved that in CNN networks the first layers extract very simple elements like lines and curves but last layers extracts more complex features.
  
  3- number of hidden units is a hyper-parameters and usually you should find it by testing or based on your background knowledge.
  
  But what can you do at all?
  As you can tests different parameters and compare their results there is some other options! One option is grid search you can check this tutorial <https://towardsdatascience.com/grid-search-for-model-tuning-3319b259367e>
  
  
  ---
  
  