Skip to content

Commit

Permalink
Merge pull request #4 from eriche2016/master
Browse files Browse the repository at this point in the history
Update camvid.lua bug for file path reading
  • Loading branch information
erogol committed Dec 29, 2016
2 parents 4cc2fee + 1105aa6 commit adc170e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
6 changes: 2 additions & 4 deletions data/camvid.lua
Expand Up @@ -11,8 +11,6 @@ function CamvidDataset:__init(imageInfo, opt, split)
self.classes = imageInfo.classes
self.opt = opt
self.split = split
self.dir = opt.datapath
assert(paths.dirp(self.dir), 'directory does not exist: ' .. self.dir)
collectgarbage()
end

Expand All @@ -22,8 +20,8 @@ function CamvidDataset:get(i)
local image_path = ffi.string(self.imageInfo.imagePath[i]:data())
local label_path = ffi.string(self.imageInfo.labelPath[i]:data())

local image = self:_loadImage(paths.concat(self.dir, image_path), 3)
local label = self:_loadImage(paths.concat(self.dir, label_path), 1):squeeze():float() + 2
local image = self:_loadImage(image_path, 3)
local label = self:_loadImage(label_path, 1):squeeze():float() + 2
local mask = label:eq(13):float()
label = label - mask * #self.classes

Expand Down
4 changes: 2 additions & 2 deletions opts.lua
Expand Up @@ -5,8 +5,8 @@ function opts.parse(arg)
local opt = lapp [[
Command line options:
Training Related:
-lr,--learningRate (default 5e-4) learning rate
-lrds,--learningRateDecaySteps (default 5) number of epochs to reduce LR by 0.1
-l,--learningRate (default 5e-4) learning rate
-d,--learningRateDecaySteps (default 5) number of epochs to reduce LR by 0.1
-w,--weightDecay (default 2e-4) L2 penalty on the weights
-m,--momentum (default 0.9) momentum
-b,--batchSize (default 10) batch size
Expand Down

0 comments on commit adc170e

Please sign in to comment.