Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Encog - How to load training data for Neural Network

The NeuralDataSet objects that I've seen in action haven't been anything but XOR which is just two small data arrays... I haven't been able to figure out anything from the documentation on MLDataSet.

It seems like everything must be loaded at once. However, I would like to loop through training data until I reach EOF and then count that as 1 epoch.. However, everything I've seen all the data must be loaded into 1 2D array from the beginning. How can I get around this?

I've read this question, and the answers didn't really help me. And besides that, I haven't found a similar question asked on here.

like image 648
jonbon Avatar asked Jul 14 '15 21:07

jonbon


1 Answers

This is possible, you can either use an existing implementation of a data set that supports streaming operation or you can implement your own on top of whatever source you have. Check out the BasicMLDataSet interface and the SQLNeuralDataSet code as an example. You will have to implement a codec if you have a specific format. For CSV there is an implementation already, I haven't checked if it is memory based though.

Remember when doing this that your data will be streamed fully for each epoch and from my experience that is a much higher bottleneck than the actual computation of the network.

like image 175
Elmar Weber Avatar answered Sep 29 '22 17:09

Elmar Weber