Skip to content

Commit

Permalink
Fix the data type image.load
Browse files Browse the repository at this point in the history
Thanks Daniil Belkov!

`byte` was defaulting to `"float"`
  • Loading branch information
Brandon Amos committed Oct 7, 2016
1 parent 041c90f commit 1267e1a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion batch-represent/dataset.lua
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion training/dataset-issue-132.lua
Expand Up @@ -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
Expand Down

0 comments on commit 1267e1a

Please sign in to comment.