pescadores / pescador

Stochastic multi-stream sampling for iterative learning
https://pescador.readthedocs.io
ISC License
76 stars 12 forks source link

allow to specify concatenation axis for buffered streamer #137

Closed faroit closed 6 years ago

faroit commented 6 years ago

pytorch defaults to (seq_len, batch, input_size) in their recurrent modules. Its possible to change this to batch first, but I measured a significant slowdown.

Why not allow the user to provide a the axis for concatenation when using the buffered streamer for convenience.

something like

pescador.buffer_stream(streamer, minibatch_size, axis=1)

which could use np.swapaxis or some other tricks inside pescador to stack the samples.

bmcfee commented 6 years ago

Does this dupe #127? (But yes, I agree, buffering should have an axis parameter)

faroit commented 6 years ago

yes, I think its a duplicate of #127. Feel free to close this out.