automated change of number of neurons in a neural network
7 views (last 30 days)
Show older comments
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 ?
0 Comments
Answers (1)
Shubh Dhyani
on 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 :
0 Comments
See Also
Categories
Find more on Deep Learning Toolbox in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!