Closed escorciav closed 2 years ago
As a small code example:
import torchnet as tnt
import torch
f = []
t = []
for i in xrange(100):
f.append(torch.randn(20))
t.append(torch.randn(1))
b = tnt.dataset.TensorDataset([f,t])
seta = tnt.dataset.BatchDataset(b, 2)
for k,v in seta:
print k,v
This will fail in the line above mentioned.
Hi,
I tried to use BatchDataset to concatenate the outputs,
tuple
with features, labels, etc., from my dataset but it seems that I should pack them inside a dictionary otherwise, this line will produce an error. It would be cool to say that in the documentation or provide support for iterable like tuple and list.P.D. Thanks for providing this awesome set of tools.