diff --git a/batch-represent/dataset.lua b/batch-represent/dataset.lua index f365317..fc1d13a 100644 --- a/batch-represent/dataset.lua +++ b/batch-represent/dataset.lua @@ -328,7 +328,7 @@ end -- by default, just load the image and return it function dataset:defaultSampleHook(imgpath) - local out = image.load(imgpath, self.loadSize[1]) + local out = image.load(imgpath, 3, byte) out = image.scale(out, self.sampleSize[3], self.sampleSize[2]) return out end diff --git a/training/dataset.lua b/training/dataset.lua index 34df663..e5a6eb0 100644 --- a/training/dataset.lua +++ b/training/dataset.lua @@ -330,7 +330,7 @@ end -- by default, just load the image and return it function dataset:defaultSampleHook(imgpath) - local out = image.load(imgpath, self.loadSize[1]) + local out = image.load(imgpath, 3, byte) out = image.scale(out, self.sampleSize[3], self.sampleSize[2]) return out end