Neural Network Toolbox: screen freeze when training with too many samples
5 views (last 30 days)
Show older comments
Hi,
I'm training a custom feedforward network (the strucuture is rather complicated and I think doesn't matter for this question). The input 102-dimensional.
Everything works fine when I used only a few training samples. But there seems to be some magic number and when I call train(...) with more samples than this number, my screen freezes and I have to reboot my ubuntu system. This number is different depending on the training function. For trainlm it is smaller then for trainrp.
For trainrp I can use up to 1000 samples before this happens. traingd still works with more samples but I would prefer to use trainrp ...
Do you know this problem? What is causing it and how can I fix/work around it? Is there maybe some way to use minibatches that can handle more samples?
Thanks a lot! Rico
0 Comments
Accepted Answer
Greg Heath
on 28 Jul 2013
Using trainrp instead of trainlm will help
Research the documentation for use of
net.efficiency.memoryreduction
Hope this helps.
Thank you for formally accepting my answer
Greg
P.S. In the near future I will submit a post on how to duplicate neural network hidden layer signals.
0 Comments
More Answers (1)
Greg Heath
on 24 Jul 2013
Not enough info to give you the best advice. Some things to think about:
How many examples do you have?
How many outputs? Are they linearly independent? help cond, help corrcoef
Do you really need 102 inputs? Are they linearly independent?
Why isn't a standard single hidden layer NN sufficient? Have you tried them?
net.numWeightElements = ?
Your training set size only has to be large enough to adequately characterize the salient characteristics of the complete distribution.
You may want to randomly sample your data set for increasingly large training sets, train using 'dividetrain' and separately test with the rest of the data.
You may want to randomly sample your data set for multiple training sets, design multiple nets with 'dividetrain' and average the otputs of te multiple nets. Search the NN literature (e.g., comp.ai.neural-nets and comp.soft-sys.matlab) using word ensemble.
Hope this helps.
Greg
P.S. Using ensembles with non-custom designs may be more efficient.
See Also
Categories
Find more on Sequence and Numeric Feature Data Workflows in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!