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?


1 Answer 1


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


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .