Is there any definite way in PyTorch for loading only images from a folder without any labels or ground truths as in a supervised classification task?
I hope this helps, http://pytorch.org/docs/master/torchvision/datasets.html#imagefolder
Thanks. But I was asking how to load images in a folder into batches without any target (or labels) as in a supervised task.
Just like in autoencoders there are no image labels as such.
Have a look here to see how a generic
Dataset can be implemented:
In particular, the
__getitiem__ method, which returns a tuple comprising (data, label)
The generic loop is something like:
for (data, labels) in dataloader: # train / eval code
You’re free to ignore the label here and you can train an autoencoder on cifar10, for example, pretty much out of the box.