beacon-biosignals / OndaBatches.jl

Local and distributed batch loading for Onda datasets
MIT License
2 stars 0 forks source link

refactor batch iteration to allow for composable batching schemes #5

Open kleinschmidt opened 2 years ago

kleinschmidt commented 2 years ago

Currently, RandomBatches is a big chonky struct that includes three, separate things:

Really, these are basically orthogonal to each other, and we could support more flexible batching specifications by allowing users to "mix and match" different ways of sampling batches with some light refactoring.

kleinschmidt commented 2 years ago

From https://github.com/beacon-biosignals/OndaBatches.jl/pull/15#discussion_r945985075:

I wonder if we can (ab)use channel selectors even further, by something like samples[RandomChannels(rng, 3), :] 😄. Then instead of passing around n_channels, we could pass the selector. Oh, except you need the RNG here, not at creation time... Ok idk