imagenet-multiGPU.torch icon indicating copy to clipboard operation
imagenet-multiGPU.torch copied to clipboard

random loading data sequence

Open zijunwei opened this issue 8 years ago • 1 comments

Technically this is not an issue, but I feel more stable if this can be fixed. The possible problem lies in 'dataset.lua' around line 105. When function dir.getdirectories(path) seems to return a list of directories based on the modified time. I prefer to sort the names so that the list of classes and their numbers are fixed. It is especially required if you want to load some pre-trained model for example vgg16 because most of them arrange the classes and their numbers in alphabetical order May be do a sort before the line 107 will solve the problem

zijunwei avatar Mar 30 '16 01:03 zijunwei

local dirs = dir.getdirectories(path);
table.sort(dirs)

It seems that simply add a table.sort(dirs) will give the desirable result.

jayleicn avatar Aug 24 '16 22:08 jayleicn