Permalink
Browse files

Fix the data type image.load

Thanks Daniil Belkov!

`byte` was defaulting to `"float"`
  • Loading branch information...
1 parent 041c90f commit 1267e1abb3df69c97d5a54fb65b60678b44f66d2 @bamos bamos committed Oct 7, 2016
Showing with 2 additions and 2 deletions.
  1. +1 −1 batch-represent/dataset.lua
  2. +1 −1 training/dataset-issue-132.lua
@@ -327,7 +327,7 @@ end
-- by default, just load the image and return it
function dataset:defaultSampleHook(imgpath)
- local out = image.load(imgpath, 3, byte)
+ local out = image.load(imgpath, 3, 'float')
out = image.scale(out, self.sampleSize[3], self.sampleSize[2])
return out
end
@@ -272,7 +272,7 @@ end
-- by default, just load the image and return it
function dataset:defaultSampleHook(imgpath)
- local out = image.load(imgpath, 3, byte)
+ local out = image.load(imgpath, 3, 'float')
out = image.scale(out, self.sampleSize[3], self.sampleSize[2])
return out
end

0 comments on commit 1267e1a

Please sign in to comment.