Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/clementfarabet/lua---nnx.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClement Farabet <clement.farabet@gmail.com>2011-08-15 01:41:58 +0400
committerClement Farabet <clement.farabet@gmail.com>2011-08-15 01:41:58 +0400
commita4b204b6e137407a2c6648ba0b89c78e4c10a8ca (patch)
tree05cf19023e993309fa683a65b6193f0b4e0726dd
parentc60b858b5fd71a43ec6367db4c77fd66dc3af07e (diff)
Added normer to DataSetLabelMe display.
-rw-r--r--DataSetLabelMe.lua4
1 files changed, 4 insertions, 0 deletions
diff --git a/DataSetLabelMe.lua b/DataSetLabelMe.lua
index fed7b70..5fcb5fc 100644
--- a/DataSetLabelMe.lua
+++ b/DataSetLabelMe.lua
@@ -433,6 +433,10 @@ function DataSetLabelMe:display(...)
self:loadSample(i)
local dispTensor = self.currentSample:clone()
local dispMask = self.currentMask:clone()
+ if dispTensor:size(1) > 3 and dispTensor:nDimension() == 3 then
+ dispTensor = dispTensor:narrow(1,1,3)
+ end
+ dispTensor:div(dispTensor:max())
dispMask, self.colormap = imgraph.colorize(dispMask, self.colormap)
dispTensor:add(dispMask)
allimgs[i] = dispTensor