Solved – ny method for choosing the number of layers and neurons

autoencodershyperparameterneural networks

I'm learning autoencoders applied to image classification. However, I'm in the beginning stage (training the autoencoder for feature extraction).

I was testing different topologies by changing the neurons number in each layer and adding more layers. But I don't have a reliable method to do that. So, I was changing the topology by adding neurons in each layer (always using sigmoidal function) and I have sometimes better results and in others worse. I want to know, how can I make this decision? For example, with 1000 neurons works fine and 1005 works fine as well, the same thing with 1010 and 1015.

Is there any methodology for changing the topology following any rule, concept, idea or technique? I used k-fold in neural networks to do that in simple MLPs. Nevertheless, with autoencoders I will need a lot of processing time to apply that in all architectures, when trying different topologies.

Best Answer

There is no direct way to find the optimal number of them: people empirically try and see (e.g., using cross-validation). The most common search techniques are random, manual, and grid searches.


There exist more advanced techniques such as

1) Gaussian processes. Example:

2) Neuro-evolution. Examples:

Related Question