nicholas-leonard / dp

A deep learning library for streamlining research and development using the Torch7 distribution.
Other
343 stars 139 forks source link

Randomly generated data as the data source #160

Open eulerreich opened 9 years ago

eulerreich commented 9 years ago

Currently, if I want to randomly generate sequences of bits as input and some transform of these sequences as output, I'd have to do this all at once before training, for a fixed number of samples, to make a data source. Is there a way to generate these data on the fly, as the model is requesting them?

nicholas-leonard commented 9 years ago

@eulerreich Yes, you could implement a DataSet subclass that does this for you. Just over-write the sub(), index() or sample() method. These work respectively with the Sampler, ShuffleSampler and RandomSampler samplers.