How to use MATLAB's neural network tool box for minibatch gradient descent?
4 views (last 30 days)
Show older comments
Hi,
I want to learn the functional relationship between a set of input-output pairs. Each input is a vector of length 500 and the output is a scalar value. I have 1 million such input output pairs and the disk space is not enough to train on this entire batch of data at once (using a GPU).
Is there a way to perform mini-batch training in matlab? This question has been asked in the past ( http://www.mathworks.com/matlabcentral/answers/254826-matlab-neural-network-mini-batch-training ) but there was no reply.
I am aware of the function "adapt", which updates the network with each incoming input-output pair, but I want to perform training in a mini-batch. Are there any options to do so using the MATLAB Neural Network toolbox?
Please help me out, Ekta
0 Comments
Accepted Answer
Greg Heath
on 18 Feb 2016
True to his word, Dr. Heath has posted
http://www.mathworks.com/matlabcentral/newsreader/view_thread/344511#943659
Hope this helps
Thank you for formally accepting my answer
Greg
2 Comments
Greg Heath
on 4 Mar 2016
Maybe a good programmer can optimize the code. The logic is straightforward.
Good Luck,
Greg
More Answers (1)
Greg Heath
on 17 Feb 2016
There is no problem; Train in a loop. However, do not configure or initialize the net between the minibatches of training data.
Hope this helps.
Thank you for formally accepting my answer
Greg
4 Comments
Greg Heath
on 18 Feb 2016
No, it looks like I was wrong. As far as searching mathworks for minibatch info, I get the following number of hits
NEWSGROUP ANSWERS
minibatch 0 3
mini-batch 0 6 (includes above 3)
I will see if I can structure the guts of a naive minibatch code and post in the NEWSGROUP.
Greg
See Also
Categories
Find more on Image Data Workflows 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!