facebookarchive / fb.resnet.torch

Torch implementation of ResNet from http://arxiv.org/abs/1512.03385 and training scripts
Other
2.29k stars 664 forks source link

Will the dataset be shuffled randomly when fine-tuning on a custom dataset? #159

Closed panovr closed 7 years ago

panovr commented 7 years ago

I prepare my custom dataset following the guide like:

train/<label1>/<image.jpg>
train/<label2>/<image.jpg>
val/<label1>/<image.jpg>
val/<label2>/<image.jpg>

I just want to ask that will the dataset be shuffled randomly when fine-tuning?

aabobakr commented 7 years ago

Yes. Data are shuffled every epoch. In the dataloader.lua this, line generates the random permutation every epoch local perm = torch.randperm(size)

panovr commented 7 years ago

That's it, thanks!