automated change of number of neurons in a neural network

7 Ansichten (letzte 30 Tage)
Mokhtar
Mokhtar am 29 Sep. 2022
Beantwortet: Shubh Dhyani am 4 Nov. 2022
Hello,
i am trying to train a DDPG agent for a multiple number of nodes pro hidden layer, and i wanna know what is the best number of neurons to take. i know that i have to do through trail and fail. and i wanna know is there a function where i can automate it. i mean if i can do the training for different number of neurons pro hidden layer like create an array x = [16 32 64 128 256] and train the network for each number in the array (number of nodes pro hidden layer) in a for loop ?

Antworten (1)

Shubh Dhyani
Shubh Dhyani am 4 Nov. 2022
I understand that you are trying to train a DDPG agent for multiple numbers of nodes for hidden layers and want to know what is the best number of neurons that you can take. I am assuming that the word "best" signifies the most optimized value (having the least loss) of the number of neurons.
The number of neurons can be considered as a hyperparameter of the neural network. For finding the most optimal value of the number of neurons (layer size), you can use hyperparameter tuning methods. Although MATLAB has no specific hyperparameter tuning function, you can make use of Bayesian Optimization method for hyperparameter tuning.
You can refer to the following link for more information about the same :

Kategorien

Mehr zu Deep Learning Toolbox finden Sie in Help Center und File Exchange

Produkte


Version

R2022a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by