Closed majidaldo closed 9 years ago
Yes, this is currently the intended functionality -- the Dataset constructor has to consume the first result from the callable to determine the shape of the minibatches.
I wrote it this way thinking that the use case for a dataset created from a callable is that the callable is capable of producing infinitely many samples (e.g. sampling from some gaussian distribution), so consuming and discarding one sample should be ok.
If you'd rather not discard one of the samples, I think the code consumes the first one only for logging purposes. We could remove that from the dataset and preserve all the samples that way?
I see. Well in my case, the callable makes different shapes. Plus the user should know the shape of the minibatches. So it makes sense to only log perhaps the size of the dataset from a callable.
Just changed so that callable sources do not pull the first batch for logging purposes.
The first called minibatch from a callable is left out when given to Dataset demo:
ouput
..and this is not minding that it's not really 32x