Shallow Neural Network with Stochastic Gradient Descent
21 views (last 30 days)
Show older comments
Maryam Saeed
on 23 Mar 2020
Commented: Maryam Saeed
on 26 Mar 2020
Hi
I am looking to design a shallow neural network with the gradient descent algorithm. From what I can find from research and Googling, the old Neural Networks toolbox didn't have this option. I understand the options I am looking for are available with the CNN functions. But I just need a simple multilayered Aritificial Neural Network with stochastic gradient descent. I have the neural network setup with feedforwardnet but I can't find any function for stochastic gradient descent as a training function, i.e. no mini-Batches.
So far, I have the simple gradient descent: net.trainFcn = 'traingd';
Am I missing something? Or coding it from scratch is the only option?
0 Comments
Accepted Answer
Srivardhan Gadila
on 26 Mar 2020
The following command lists all the training functions available:
help nntrain
From the output I can see that stochastic gradient descent is not there in case of shallow neural networks.
Since that you want a simple Multilayered ANN, refer to List of Deep Learning Layers & use appropriate layer from Input Layers followed by fullyconnectedLayers & appropriate Output Layer. Then use the 'sgdm' in trainingOptions.
Also refer to Deep Learning Toolbox — Examples
More Answers (0)
See Also
Categories
Find more on Modeling and Prediction with NARX and Time-Delay Networks 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!